summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ether.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-02-01 20:19:25 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-02-01 20:19:25 +0000
commitc47b47293a6b69e6dee72577b6e8d34278fe56ba (patch)
tree114bc76e4c556077fdebfc304d7909c0dc8232b5 /sys/netinet/ip_ether.c
parentb903e4b4cffc69cd803e6845fec6fa1b34d175e4 (diff)
grr, don't forget to change the reserved field to the upper 4 bits of the header.
Diffstat (limited to 'sys/netinet/ip_ether.c')
-rw-r--r--sys/netinet/ip_ether.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/ip_ether.c b/sys/netinet/ip_ether.c
index 5597f252af7..cb495529c98 100644
--- a/sys/netinet/ip_ether.c
+++ b/sys/netinet/ip_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ether.c,v 1.19 2001/02/01 20:14:26 jason Exp $ */
+/* $OpenBSD: ip_ether.c,v 1.20 2001/02/01 20:19:24 jason Exp $ */
/*
* The author of this code is Angelos D. Keromytis (kermit@adk.gr)
@@ -136,13 +136,14 @@ va_dcl
/* Verify EtherIP version number */
m_copydata(m, iphlen, sizeof(u_int8_t), &v);
- if ((v & ETHERIP_VERSION_MASK) != ETHERIP_VERSION) {
+ if ((v & ETHERIP_VERSION_MASK) != ETHERIP_VERSION)
+ {
/*
* Note that the other potential failure of the above check is that the
* second nibble of the EtherIP header (the reserved part) is not
* zero; this is also invalid protocol behaviour.
*/
- if (v & 0x0f)
+ if (v & ETHERIP_RSVD_MASK)
{
DPRINTF(("etherip_input(): received invalid EtherIP header (reserved field non-zero\n"));
}