diff options
author | bz <bz@FreeBSD.org> | 2010-08-27 23:22:58 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2010-08-27 23:22:58 +0000 |
commit | 70761a9ea64442ce1af9c36b3e25c74757018580 (patch) | |
tree | 72e9855fb6644c3adc628c87ecb933f814d02cf8 /sys/net | |
parent | 1d0bc060d705ba45fc9b29af20aca11e6f3b09af (diff) | |
download | FreeBSD-src-70761a9ea64442ce1af9c36b3e25c74757018580.zip FreeBSD-src-70761a9ea64442ce1af9c36b3e25c74757018580.tar.gz |
MFp4 CH=182972:
Add explicit linkstate UP/DOWN for the epair. This is needed by carp(4)
and other things to work.
MFC after: 5 days
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_epair.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 13907e4..ac0c801 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -832,6 +832,8 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) /* Tell the world, that we are ready to rock. */ sca->ifp->if_drv_flags |= IFF_DRV_RUNNING; scb->ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_link_state_change(sca->ifp, LINK_STATE_UP); + if_link_state_change(scb->ifp, LINK_STATE_UP); return (0); } @@ -859,6 +861,8 @@ epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) scb = oifp->if_softc; DPRINTF("ifp=%p oifp=%p\n", ifp, oifp); + if_link_state_change(ifp, LINK_STATE_DOWN); + if_link_state_change(oifp, LINK_STATE_DOWN); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; oifp->if_drv_flags &= ~IFF_DRV_RUNNING; ether_ifdetach(oifp); |