summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-10-20 22:52:07 +0000
committerphk <phk@FreeBSD.org>2002-10-20 22:52:07 +0000
commit419afbc0d3d9432a72ea3e36f9c4974b31428c35 (patch)
tree3085be4699af33492ff2fa83133fe4d6b7d15a25 /sys/netinet/raw_ip.c
parent58072098f10aafb040901741472830c4d8efcb3a (diff)
downloadFreeBSD-src-419afbc0d3d9432a72ea3e36f9c4974b31428c35.zip
FreeBSD-src-419afbc0d3d9432a72ea3e36f9c4974b31428c35.tar.gz
Fix two instances of variant struct definitions in sys/netinet:
Remove the never completed _IP_VHL version, it has not caught on anywhere and it would make us incompatible with other BSD netstacks to retain this version. Add a CTASSERT protecting sizeof(struct ip) == 20. Don't let the size of struct ipq depend on the IPDIVERT option. This is a functional no-op commit. Approved by: re
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index de539fa..97dabef 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -59,7 +59,6 @@
#include <net/if.h>
#include <net/route.h>
-#define _IP_VHL
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_pcb.h>
@@ -283,10 +282,10 @@ rip_output(m, so, dst)
ip = mtod(m, struct ip *);
/* don't allow both user specified and setsockopt options,
and don't allow packet length sizes that will crash */
- if (((IP_VHL_HL(ip->ip_vhl) != (sizeof (*ip) >> 2))
+ if (((ip->ip_hl != (sizeof (*ip) >> 2))
&& inp->inp_options)
|| (ip->ip_len > m->m_pkthdr.len)
- || (ip->ip_len < (IP_VHL_HL(ip->ip_vhl) << 2))) {
+ || (ip->ip_len < (ip->ip_hl << 2))) {
m_freem(m);
return EINVAL;
}
OpenPOWER on IntegriCloud