Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2010 23:22:58 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r211904 - head/sys/net
Message-ID:  <201008272322.o7RNMwDt010791@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008272322.o7RNMwDt010791>