summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-03-30 16:02:14 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-03-30 16:02:14 +0000
commit8e38c2e0360cb1c96dec928389b21d799014f17e (patch)
tree869b3c71a36e47554a9c006a8d1e04b3583329d4
parentf4b74e9a2ce6127ee5b1465f68521c778b19d921 (diff)
increase ierrors if m_pullup fails in vlan_input(); pointed out by chris@
-rw-r--r--sys/net/if_vlan.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index d2ff658e528..abfc5db3136 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.15 2001/03/28 00:16:28 jason Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.16 2001/03/30 16:02:13 jason Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
*
@@ -347,8 +347,10 @@ vlan_input(eh, m)
u_int tag;
if (m->m_len < EVL_ENCAPLEN &&
- (m = m_pullup(m, EVL_ENCAPLEN)) == NULL)
- return (-1);
+ (m = m_pullup(m, EVL_ENCAPLEN)) == NULL) {
+ m->m_pkthdr.rcvif->if_ierrors++;
+ return (0);
+ }
tag = EVL_VLANOFTAG(ntohs(*mtod(m, u_int16_t *)));