From e087a65775cc06b02d8e1f1f8bce1ebb8c405c54 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 22 May 2021 12:41:29 +0200 Subject: [PATCH] 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. --- Userland/Applets/Network/main.cpp | 2 +- Userland/Utilities/test-bindtodevice.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Applets/Network/main.cpp b/Userland/Applets/Network/main.cpp index de949eaed5..c37c1237a4 100644 --- a/Userland/Applets/Network/main.cpp +++ b/Userland/Applets/Network/main.cpp @@ -126,7 +126,7 @@ private: auto ifname = if_object.get("name").to_string(); if (!include_loopback) - if (ifname == "loop0") + if (ifname == "loop") return; if (ip_address != "null") connected_adapters++; diff --git a/Userland/Utilities/test-bindtodevice.cpp b/Userland/Utilities/test-bindtodevice.cpp index 633ca838d7..d0e6ddbe9c 100644 --- a/Userland/Utilities/test-bindtodevice.cpp +++ b/Userland/Utilities/test-bindtodevice.cpp @@ -60,7 +60,7 @@ void test_valid(int fd) // bind to an interface that exists char buf[IFNAMSIZ]; socklen_t buflen = IFNAMSIZ; - memcpy(buf, "loop0", 6); + memcpy(buf, "loop", 5); if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, buf, buflen) < 0) { perror("setsockopt(SO_BINDTODEVICE) :: valid"); @@ -75,7 +75,7 @@ void test_no_route(int fd) // bind to an interface that cannot deliver char buf[IFNAMSIZ]; socklen_t buflen = IFNAMSIZ; - memcpy(buf, "loop0", 6); + memcpy(buf, "loop", 5); if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, buf, buflen) < 0) { perror("setsockopt(SO_BINDTODEVICE) :: no_route");