mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 11:39:43 +00:00
Userland: Rename loop0 to loop
Now that the kernel picks a different name for the loopback adapter we should update userland to account for this.
This commit is contained in:
parent
e5e00bec8f
commit
e087a65775
Notes:
sideshowbarker
2024-07-18 17:32:36 +09:00
Author: https://github.com/gunnarbeutner
Commit: e087a65775
Pull-request: https://github.com/SerenityOS/serenity/pull/7385
Reviewed-by: https://github.com/supercomputer7
2 changed files with 3 additions and 3 deletions
|
@ -126,7 +126,7 @@ private:
|
||||||
auto ifname = if_object.get("name").to_string();
|
auto ifname = if_object.get("name").to_string();
|
||||||
|
|
||||||
if (!include_loopback)
|
if (!include_loopback)
|
||||||
if (ifname == "loop0")
|
if (ifname == "loop")
|
||||||
return;
|
return;
|
||||||
if (ip_address != "null")
|
if (ip_address != "null")
|
||||||
connected_adapters++;
|
connected_adapters++;
|
||||||
|
|
|
@ -60,7 +60,7 @@ void test_valid(int fd)
|
||||||
// bind to an interface that exists
|
// bind to an interface that exists
|
||||||
char buf[IFNAMSIZ];
|
char buf[IFNAMSIZ];
|
||||||
socklen_t buflen = IFNAMSIZ;
|
socklen_t buflen = IFNAMSIZ;
|
||||||
memcpy(buf, "loop0", 6);
|
memcpy(buf, "loop", 5);
|
||||||
|
|
||||||
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, buf, buflen) < 0) {
|
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, buf, buflen) < 0) {
|
||||||
perror("setsockopt(SO_BINDTODEVICE) :: valid");
|
perror("setsockopt(SO_BINDTODEVICE) :: valid");
|
||||||
|
@ -75,7 +75,7 @@ void test_no_route(int fd)
|
||||||
// bind to an interface that cannot deliver
|
// bind to an interface that cannot deliver
|
||||||
char buf[IFNAMSIZ];
|
char buf[IFNAMSIZ];
|
||||||
socklen_t buflen = IFNAMSIZ;
|
socklen_t buflen = IFNAMSIZ;
|
||||||
memcpy(buf, "loop0", 6);
|
memcpy(buf, "loop", 5);
|
||||||
|
|
||||||
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, buf, buflen) < 0) {
|
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, buf, buflen) < 0) {
|
||||||
perror("setsockopt(SO_BINDTODEVICE) :: no_route");
|
perror("setsockopt(SO_BINDTODEVICE) :: no_route");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue