aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-10-20 22:52:07 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-10-20 22:52:07 +0000
commit53be11f68094cc5a97a63759a91d4a8f1a8a38b6 (patch)
tree3085be4699af33492ff2fa83133fe4d6b7d15a25 /sys/netinet/tcp_subr.c
parente6a5564ee20f82904308de5a95f56232363f50aa (diff)
downloadsrc-53be11f68094cc5a97a63759a91d4a8f1a8a38b6.tar.gz
src-53be11f68094cc5a97a63759a91d4a8f1a8a38b6.zip
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
Notes
Notes: svn path=/head/; revision=105586
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 02da281fb250..c83d952891fb 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.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);