Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jan 2015 09:50:43 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r277059 - head/sys/netgraph
Message-ID:  <201501120950.t0C9ohHJ006030@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Mon Jan 12 09:50:42 2015
New Revision: 277059
URL: https://svnweb.freebsd.org/changeset/base/277059

Log:
  When the node receives NGM_FLOW_COOKIE update the if_link_state, instead
  of playing with almost dead IFF_DRV_RUNNING flag.
  
  Sponsored by:	Nginx, Inc.

Modified:
  head/sys/netgraph/ng_iface.c

Modified: head/sys/netgraph/ng_iface.c
==============================================================================
--- head/sys/netgraph/ng_iface.c	Mon Jan 12 09:48:45 2015	(r277058)
+++ head/sys/netgraph/ng_iface.c	Mon Jan 12 09:50:42 2015	(r277059)
@@ -639,10 +639,10 @@ ng_iface_rcvmsg(node_p node, item_p item
 	case NGM_FLOW_COOKIE:
 		switch (msg->header.cmd) {
 		case NGM_LINK_IS_UP:
-			ifp->if_drv_flags |= IFF_DRV_RUNNING;
+			if_link_state_change(ifp, LINK_STATE_UP);
 			break;
 		case NGM_LINK_IS_DOWN:
-			ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+			if_link_state_change(ifp, LINK_STATE_DOWN);
 			break;
 		default:
 			break;



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