diff options
author | thompsa <thompsa@FreeBSD.org> | 2012-04-20 09:55:50 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2012-04-20 09:55:50 +0000 |
commit | 5ffa03204ccf2735f460fb6731c0c73d0ac11d17 (patch) | |
tree | 5e720f1f10937bda6108ab3cf3fe0a0b81caa055 /sys/net/if.c | |
parent | 6152dc39f23cf9b5f8db831ea0d2de2e59e9feea (diff) | |
download | FreeBSD-src-5ffa03204ccf2735f460fb6731c0c73d0ac11d17.zip FreeBSD-src-5ffa03204ccf2735f460fb6731c0c73d0ac11d17.tar.gz |
Add linkstate to bridge(4), set the link to up when at least one underlying
interface is up, otherwise the link is down.
This, among other things, allows carp to work on a bridge.
Prodded by: glebius
Tested by: Alexander Lunev
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 8d2c5f2..bf332db 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -124,7 +124,7 @@ static MALLOC_DEFINE(M_IFDESCR, "ifdescr", "ifnet descriptions"); static struct sx ifdescr_sx; SX_SYSINIT(ifdescr_sx, &ifdescr_sx, "ifnet descr"); -void (*bstp_linkstate_p)(struct ifnet *ifp, int state); +void (*bridge_linkstate_p)(struct ifnet *ifp); void (*ng_ether_link_state_p)(struct ifnet *ifp, int state); void (*lagg_linkstate_p)(struct ifnet *ifp, int state); /* These are external hooks for CARP. */ @@ -1910,7 +1910,7 @@ do_link_state_change(void *arg, int pending) if (ifp->if_carp) (*carp_linkstate_p)(ifp); if (ifp->if_bridge) - (*bstp_linkstate_p)(ifp, link_state); + (*bridge_linkstate_p)(ifp); if (ifp->if_lagg) (*lagg_linkstate_p)(ifp, link_state); |