From a0aa43e90db3e5bb9f0e7dbb47f17a2442bdbd21 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 2 Mar 2010 18:17:04 +0100 Subject: [PATCH] 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. --- src/interfaces.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; -- 2.39.5