svn commit: r211904 - head/sys/net

Bjoern A. Zeeb bz at FreeBSD.org
Fri Aug 27 23:22:58 UTC 2010


Author: bz
Date: Fri Aug 27 23:22:58 2010
New Revision: 211904
URL: http://svn.freebsd.org/changeset/base/211904

Log:
  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

Modified:
  head/sys/net/if_epair.c

Modified: head/sys/net/if_epair.c
==============================================================================
--- head/sys/net/if_epair.c	Fri Aug 27 21:52:54 2010	(r211903)
+++ head/sys/net/if_epair.c	Fri Aug 27 23:22:58 2010	(r211904)
@@ -832,6 +832,8 @@ epair_clone_create(struct if_clone *ifc,
 	/* 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
 	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);


More information about the svn-src-head mailing list