## Compatibility with older kernels
-If you have a kernel older than Linux 2.6.39, you need to compile
-lldpd with `--enable-oldies` to enable some compatibility functions:
-otherwise, lldpd will only rely on Netlink to receive bridge, bond and
-VLAN information.
+If you have a kernel older than Linux 4.0, you need to compile lldpd with
+`--enable-oldies` to enable some compatibility functions: otherwise, lldpd will
+only rely on Netlink to receive wireless, bridge, bond and VLAN information.
For bonding, you need 2.6.24 (in previous version, PACKET_ORIGDEV
affected only non multicast packets). See:
#ifdef ENABLE_DOT3
# define ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32 (SCHAR_MAX)
# define ETHTOOL_DECLARE_LINK_MODE_MASK(name) \
- uint32_t name[ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32]
+ uint32_t name[ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32]
struct ethtool_link_usettings {
struct ethtool_link_settings base;
static void
iflinux_add_wireless(struct lldpd *cfg, struct interfaces_device_list *interfaces)
{
+#ifdef ENABLE_OLDIES
struct interfaces_device *iface;
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) {
iface->type |= IFACE_WIRELESS_T | IFACE_PHYSICAL_T;
}
}
+#endif
}
/* Query each interface to see if it is a bridge */
log_debug("netlink", "interface %s is a team",
iff->name);
iff->type |= IFACE_BOND_T;
+ } else if (!strcmp(kind, "wlan")) {
+ log_debug("netlink", "interface %s is wireless",
+ iff->name);
+ iff->type |= IFACE_WIRELESS_T | IFACE_PHYSICAL_T;
}
}
}