svn commit: r277059 - head/sys/netgraph

Gleb Smirnoff glebius at FreeBSD.org
Mon Jan 12 09:50:43 UTC 2015


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;


More information about the svn-src-all mailing list