Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jan 2010 08:59:33 +0000 (UTC)
From:      Max Khon <fjoe@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: r202911 - stable/8/sys/netgraph
Message-ID:  <201001240859.o0O8xX9i077138@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fjoe
Date: Sun Jan 24 08:59:33 2010
New Revision: 202911
URL: http://svn.freebsd.org/changeset/base/202911

Log:
  MFC: Send link state change control messages to "orphans" hook as well.

Modified:
  stable/8/sys/netgraph/ng_ether.c

Modified: stable/8/sys/netgraph/ng_ether.c
==============================================================================
--- stable/8/sys/netgraph/ng_ether.c	Sun Jan 24 05:23:08 2010	(r202910)
+++ stable/8/sys/netgraph/ng_ether.c	Sun Jan 24 08:59:33 2010	(r202911)
@@ -359,9 +359,6 @@ ng_ether_link_state(struct ifnet *ifp, i
 	struct ng_mesg *msg;
 	int cmd, dummy_error = 0;
 
-	if (priv->lower == NULL)
-                return;
-
 	if (state == LINK_STATE_UP)
 		cmd = NGM_LINK_IS_UP;
 	else if (state == LINK_STATE_DOWN)
@@ -369,9 +366,16 @@ ng_ether_link_state(struct ifnet *ifp, i
 	else
 		return;
 
-	NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT);
-	if (msg != NULL)
-		NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->lower, 0);
+	if (priv->lower != NULL) {
+		NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT);
+		if (msg != NULL)
+			NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->lower, 0);
+	}
+	if (priv->orphan != NULL) {
+		NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT);
+		if (msg != NULL)
+			NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->orphan, 0);
+	}
 }
 
 /******************************************************************



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