summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2012-04-20 09:55:50 +0000
committerthompsa <thompsa@FreeBSD.org>2012-04-20 09:55:50 +0000
commit5ffa03204ccf2735f460fb6731c0c73d0ac11d17 (patch)
tree5e720f1f10937bda6108ab3cf3fe0a0b81caa055 /sys/net/if.c
parent6152dc39f23cf9b5f8db831ea0d2de2e59e9feea (diff)
downloadFreeBSD-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.c4
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);
OpenPOWER on IntegriCloud