From owner-svn-src-stable@FreeBSD.ORG Sun Jan 24 08:59:34 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BE33106568B; Sun, 24 Jan 2010 08:59:34 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE69C8FC08; Sun, 24 Jan 2010 08:59:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0O8xXdw077140; Sun, 24 Jan 2010 08:59:33 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0O8xX9i077138; Sun, 24 Jan 2010 08:59:33 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201001240859.o0O8xX9i077138@svn.freebsd.org> From: Max Khon Date: Sun, 24 Jan 2010 08:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202911 - stable/8/sys/netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 08:59:34 -0000 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); + } } /******************************************************************