summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2003-07-09 22:03:15 +0000
committeritojun <itojun@openbsd.org>2003-07-09 22:03:15 +0000
commit85f7599b374a41ec5d11acfae514c94850bbe1e3 (patch)
tree1f5b2bb57030ac7b16fa1c884fd220555bcb3944 /sys/netinet/tcp_subr.c
parentopen() is not ANSI; (diff)
downloadwireguard-openbsd-85f7599b374a41ec5d11acfae514c94850bbe1e3.tar.xz
wireguard-openbsd-85f7599b374a41ec5d11acfae514c94850bbe1e3.zip
do not flip ip_len/ip_off in netinet stack. deraadt ok.
(please test, especially PF portion)
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index ea29d919bf5..2706c5edb18 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.67 2003/06/02 23:28:14 millert Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.68 2003/07/09 22:03:16 itojun Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -451,7 +451,7 @@ tcp_respond(tp, template, m, ack, seq, flags)
*/
th->th_sum = 0;
th->th_sum = in_cksum(m, tlen);
- ((struct ip *)ti)->ip_len = tlen;
+ ((struct ip *)ti)->ip_len = htons(tlen);
((struct ip *)ti)->ip_ttl = ip_defttl;
ip_output(m, (void *)NULL, ro, ip_mtudisc ? IP_MTUDISC : 0,
(void *)NULL, tp ? tp->t_inpcb : (void *)NULL);