From 73049104d9f3ffff1a96da1b536274a7e04b6297 Mon Sep 17 00:00:00 2001 From: green Date: Fri, 9 Jan 2004 02:03:24 +0000 Subject: Also, don't crash in the netgraph disconnect node if the interface is detached from the other direction. --- sys/netgraph/ng_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/netgraph') diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index b741b07..db8e941 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -628,7 +628,8 @@ ng_ether_disconnect(hook_p hook) if (hook == priv->upper) { priv->upper = NULL; - priv->ifp->if_hwassist = priv->hwassist; /* restore h/w csum */ + if (priv->ifp != NULL) /* restore h/w csum */ + priv->ifp->if_hwassist = priv->hwassist; } else if (hook == priv->lower) { priv->lower = NULL; priv->lowerOrphan = 0; -- cgit v1.1