summaryrefslogtreecommitdiffstats
path: root/sys/net/if_bridge.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2010-01-18 20:34:00 +0000
committerthompsa <thompsa@FreeBSD.org>2010-01-18 20:34:00 +0000
commit5056e27c2d94cd3dce26860a82a784814b55b3e9 (patch)
treedd7afcb5b04be71754018029b851f7d8237827cf /sys/net/if_bridge.c
parent49b1f6fa86c80625bf72859d7b5c716fab6d1233 (diff)
downloadFreeBSD-src-5056e27c2d94cd3dce26860a82a784814b55b3e9.zip
FreeBSD-src-5056e27c2d94cd3dce26860a82a784814b55b3e9.tar.gz
Declare a new EVENTHANDLER called iflladdr_event which signals that the L2
address on an interface has changed. This lets stacked interfaces such as vlan(4) detect that their lower interface has changed and adjust things in order to keep working. Previously this situation broke at least vlan(4) and lagg(4) configurations. The EVENTHANDLER_INVOKE call was not placed within if_setlladdr() due to the risk of a loop. PR: kern/142927 Submitted by: Nikolay Denev
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r--sys/net/if_bridge.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 36fb9d8..7084fe6 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -917,6 +917,7 @@ bridge_delete_member(struct bridge_softc *sc, struct bridge_iflist *bif,
IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN);
sc->sc_ifaddr = fif;
}
+ EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp);
}
bridge_mutecaps(sc); /* recalcuate now this interface is removed */
@@ -1033,6 +1034,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg)
!memcmp(IF_LLADDR(sc->sc_ifp), sc->sc_defaddr, ETHER_ADDR_LEN)) {
bcopy(IF_LLADDR(ifs), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN);
sc->sc_ifaddr = ifs;
+ EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp);
}
ifs->if_bridge = sc;
OpenPOWER on IntegriCloud