]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
daemon: do not fallback to ioctl for wireless
authorVincent Bernat <vincent@bernat.ch>
Tue, 10 Mar 2026 16:12:25 +0000 (17:12 +0100)
committerVincent Bernat <vincent@bernat.ch>
Tue, 10 Mar 2026 20:20:15 +0000 (21:20 +0100)
Even very old kernels support this wireless directory.

src/daemon/interfaces-linux.c

index 1a04a9e13d2205e69df7cac4d55336c0d6512114..9b612eeb0f94516543608daf69257120c2708f44 100644 (file)
@@ -1019,21 +1019,6 @@ iflinux_add_wireless(struct lldpd *cfg, struct interfaces_device_list *interface
                        iface->type |= IFACE_WIRELESS_T | IFACE_PHYSICAL_T;
                }
        }
-#ifdef ENABLE_OLDIES
-       /* Fallback to wireless extensions ioctl for old kernels without
-        * /sys/class/net/<name>/wireless. */
-       TAILQ_FOREACH (iface, interfaces, next) {
-               if (iface->type &
-                   (IFACE_VLAN_T | IFACE_BOND_T | IFACE_BRIDGE_T | IFACE_WIRELESS_T))
-                       continue;
-               struct iwreq iwr = {};
-               strlcpy(iwr.ifr_name, iface->name, IFNAMSIZ);
-               if (ioctl(cfg->g_sock, SIOCGIWNAME, &iwr) >= 0) {
-                       log_debug("interfaces", "%s is wireless", iface->name);
-                       iface->type |= IFACE_WIRELESS_T | IFACE_PHYSICAL_T;
-               }
-       }
-#endif
 }
 
 /* Query each interface to see if it is a bridge */