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
This commit is contained in:
Bjoern A. Zeeb 2010-08-27 23:22:58 +00:00
parent 4e52cdd0f7
commit c749353940
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211904

View File

@ -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);