Date: Sun, 24 Jan 2010 14:58:49 +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-7@freebsd.org Subject: svn commit: r202932 - stable/7/sys/netgraph Message-ID: <201001241458.o0OEwnQm061553@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); + } } /******************************************************************
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001241458.o0OEwnQm061553>