From c749353940a485fab91e92345ea2cf416eef750c Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Fri, 27 Aug 2010 23:22:58 +0000 Subject: [PATCH] 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 --- sys/net/if_epair.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 13907e42461e..ac0c8018702d 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);