summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netgraph/ng_iface.c')
-rw-r--r--sys/netgraph/ng_iface.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c
index 6a6cbdf3..d450d2e 100644
--- a/sys/netgraph/ng_iface.c
+++ b/sys/netgraph/ng_iface.c
@@ -73,13 +73,14 @@
#include <net/if_types.h>
#include <net/netisr.h>
+#include <netinet/in.h>
+
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_iface.h>
#include <netgraph/ng_cisco.h>
#ifdef INET
-#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
@@ -206,7 +207,8 @@ static struct ng_type typestruct = {
NULL,
ng_iface_rcvdata,
ng_iface_rcvdata,
- ng_iface_disconnect
+ ng_iface_disconnect,
+ NULL
};
NETGRAPH_INIT(iface, &typestruct);
@@ -683,12 +685,8 @@ ng_iface_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
int s, error = 0;
/* Sanity checks */
-#ifdef DIAGNOSTIC
- if (iffam == NULL)
- panic(__FUNCTION__);
- if ((m->m_flags & M_PKTHDR) == 0)
- panic(__FUNCTION__);
-#endif
+ KASSERT(iffam != NULL, ("%s: iffam", __FUNCTION__));
+ KASSERT(m->m_flags & M_PKTHDR, ("%s: not pkthdr", __FUNCTION__));
if (m == NULL)
return (EINVAL);
if ((ifp->if_flags & IFF_UP) == 0) {
OpenPOWER on IntegriCloud