summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2003-05-29 00:35:18 +0000
committeritojun <itojun@openbsd.org>2003-05-29 00:35:18 +0000
commit24773939e644f611587b00d484cda115e34e34df (patch)
treed1553071fcffab3eb8b2f0c141c582cf0d44a0b3 /sys/netinet/tcp_output.c
parentuse m_pulldown instead of m_pullup2. enable support for IPv6 jumbogram. (diff)
downloadwireguard-openbsd-24773939e644f611587b00d484cda115e34e34df.tar.xz
wireguard-openbsd-24773939e644f611587b00d484cda115e34e34df.zip
use m_pulldown not m_pullup2. fix some bugs in IPv6 tcp_trace().
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 7ce63727feb..0a0ec985d6f 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.54 2003/01/25 15:27:29 markus Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.55 2003/05/29 00:35:18 itojun Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -1071,9 +1071,20 @@ send:
/*
* Trace.
*/
- if (so->so_options & SO_DEBUG)
- tcp_trace(TA_OUTPUT, tp->t_state, tp, mtod(m, caddr_t), 0,
- len);
+ if (so->so_options & SO_DEBUG) {
+ /* TCP template does not fill ip version, so fill it in here */
+ struct ip *sip;
+ sip = mtod(m, struct ip *);
+ switch (tp->pf) {
+ case AF_INET:
+ sip->ip_v = 4;
+ break;
+ case AF_INET6:
+ sip->ip_v = 6;
+ break;
+ }
+ tcp_trace(TA_OUTPUT, tp->t_state, tp, m, 0, len);
+ }
/*
* Fill in IP length and desired time to live and