svn commit: r202932 - stable/7/sys/netgraph
Max Khon
fjoe at FreeBSD.org
Sun Jan 24 14:58:49 UTC 2010
Author: fjoe
Date: Sun Jan 24 14:58:49 2010
New Revision: 202932
URL: http://svn.freebsd.org/changeset/base/202932
Log:
MFC rev. 201924: Send link state change control messages
to "orphans" hook as well.
Approved by: re (kib)
Modified:
stable/7/sys/netgraph/ng_ether.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/netgraph/ng_ether.c
==============================================================================
--- stable/7/sys/netgraph/ng_ether.c Sun Jan 24 14:57:54 2010 (r202931)
+++ stable/7/sys/netgraph/ng_ether.c Sun Jan 24 14:58:49 2010 (r202932)
@@ -343,9 +343,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)
@@ -353,9 +350,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);
+ }
}
/******************************************************************
More information about the svn-src-stable
mailing list