diff options
author | phk <phk@FreeBSD.org> | 2002-10-20 22:52:07 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-20 22:52:07 +0000 |
commit | 419afbc0d3d9432a72ea3e36f9c4974b31428c35 (patch) | |
tree | 3085be4699af33492ff2fa83133fe4d6b7d15a25 /sys/netinet/tcp_timewait.c | |
parent | 58072098f10aafb040901741472830c4d8efcb3a (diff) | |
download | FreeBSD-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/tcp_timewait.c')
-rw-r--r-- | sys/netinet/tcp_timewait.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 02da281..c83d952 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -62,7 +62,6 @@ #include <net/route.h> #include <net/if.h> -#define _IP_VHL #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/ip.h> @@ -292,7 +291,8 @@ tcp_fillheaders(tp, ip_ptr, tcp_ptr) { struct ip *ip = (struct ip *) ip_ptr; - ip->ip_vhl = IP_VHL_BORING; + ip->ip_v = IPVERSION; + ip->ip_hl = 5; ip->ip_tos = 0; ip->ip_len = 0; ip->ip_id = 0; @@ -379,7 +379,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags) KASSERT(tp != NULL || m != NULL, ("tcp_respond: tp and m both NULL")); #ifdef INET6 - isipv6 = IP_VHL_V(((struct ip *)ipgen)->ip_vhl) == 6; + isipv6 = ((struct ip *)ipgen)->ip_v == 6; ip6 = ipgen; #endif /* INET6 */ ip = ipgen; @@ -1105,7 +1105,7 @@ tcp_ctlinput(cmd, sa, vip) if (ip) { s = splnet(); th = (struct tcphdr *)((caddr_t)ip - + (IP_VHL_HL(ip->ip_vhl) << 2)); + + (ip->ip_hl << 2)); INP_INFO_WLOCK(&tcbinfo); inp = in_pcblookup_hash(&tcbinfo, faddr, th->th_dport, ip->ip_src, th->th_sport, 0, NULL); |