Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Sep 2010 16:09:09 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r212150 - stable/8/sys/net
Message-ID:  <201009021609.o82G99b5010405@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Thu Sep  2 16:09:09 2010
New Revision: 212150
URL: http://svn.freebsd.org/changeset/base/212150

Log:
  MFC r211904:
  
    MFp4 CH=182972:
  
    Add explicit linkstate UP/DOWN for the epair.  This is needed by carp(4)
    and other things to work.

Modified:
  stable/8/sys/net/if_epair.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/net/if_epair.c
==============================================================================
--- stable/8/sys/net/if_epair.c	Thu Sep  2 14:13:43 2010	(r212149)
+++ stable/8/sys/net/if_epair.c	Thu Sep  2 16:09:09 2010	(r212150)
@@ -841,6 +841,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);
 }
@@ -868,6 +870,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?201009021609.o82G99b5010405>