Deleted Added
sdiff udiff text old ( 124269 ) new ( 124270 )
full compact
1
2/*
3 * ng_ether.c
4 *
5 * Copyright (c) 1996-2000 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

--- 23 unchanged lines hidden (view full) ---

32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
35 * OF SUCH DAMAGE.
36 *
37 * Authors: Archie Cobbs <archie@freebsd.org>
38 * Julian Elischer <julian@freebsd.org>
39 *
40 * $FreeBSD: head/sys/netgraph/ng_ether.c 124269 2004-01-09 00:41:45Z green $
41 */
42
43/*
44 * ng_ether(4) netgraph node type
45 */
46
47#include <sys/param.h>
48#include <sys/systm.h>

--- 574 unchanged lines hidden (view full) ---

623 */
624static int
625ng_ether_disconnect(hook_p hook)
626{
627 const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
628
629 if (hook == priv->upper) {
630 priv->upper = NULL;
631 priv->ifp->if_hwassist = priv->hwassist; /* restore h/w csum */
632 } else if (hook == priv->lower) {
633 priv->lower = NULL;
634 priv->lowerOrphan = 0;
635 } else
636 panic("%s: weird hook", __func__);
637 if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
638 && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook))))
639 ng_rmnode_self(NG_HOOK_NODE(hook)); /* reset node */

--- 68 unchanged lines hidden ---