From: Vincent Date: Tue, 2 Mar 2010 17:17:04 +0000 (+0100) Subject: Don't listen/send LLDP packets on bridge. X-Git-Tag: 0.5.0~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0aa43e90db3e5bb9f0e7dbb47f17a2442bdbd21;p=thirdparty%2Flldpd.git Don't listen/send LLDP packets on bridge. A bridge, like a VLAN or a bond device is no place to listen or send LLDP packets. --- diff --git a/src/interfaces.c b/src/interfaces.c index d549c3a4..2ba50a20 100644 --- a/src/interfaces.c +++ b/src/interfaces.c @@ -397,9 +397,10 @@ static int iface_minimal_checks(struct lldpd *cfg, struct ifaddrs *ifa) { struct sockaddr_ll *sdl; + int is_bridge = iface_is_bridge(cfg, ifa->ifa_name); if (!(LOCAL_CHASSIS(cfg)->c_cap_enabled & LLDP_CAP_BRIDGE) && - iface_is_bridge(cfg, ifa->ifa_name)) { + is_bridge) { LOCAL_CHASSIS(cfg)->c_cap_enabled |= LLDP_CAP_BRIDGE; return 0; } @@ -425,9 +426,10 @@ iface_minimal_checks(struct lldpd *cfg, struct ifaddrs *ifa) if (!(ifa->ifa_flags & (IFF_MULTICAST|IFF_BROADCAST))) return 0; - /* Don't handle bond and VLAN */ + /* Don't handle bond and VLAN, nor bridge */ if ((iface_is_vlan(cfg, ifa->ifa_name)) || - (iface_is_bond(cfg, ifa->ifa_name))) + (iface_is_bond(cfg, ifa->ifa_name)) || + is_bridge) return 0; return 1;