summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2013-08-06 07:31:48 +0000
committerbluhm <bluhm@openbsd.org>2013-08-06 07:31:48 +0000
commit157ed2f3b050b221c19b1fd38db9ecabf77e6512 (patch)
treeb0acf43db116de76cca4408581ca4e6762dc6b50
parentAfter a leading blank on an output line, the first word was counted twice (diff)
downloadwireguard-openbsd-157ed2f3b050b221c19b1fd38db9ecabf77e6512.tar.xz
wireguard-openbsd-157ed2f3b050b221c19b1fd38db9ecabf77e6512.zip
In tcp_ctloutput() tp was assigned at two different places for IPv4
and IPv6. The variable tp is not accessed between these two assingments. intotcpcb() is a define without side effects. So use the same code for IPv4 and IPv6. OK claudio@ mpi@
-rw-r--r--sys/netinet/tcp_usrreq.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index cd232e44685..4e108d144fe 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.112 2013/05/17 09:04:30 mpi Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.113 2013/08/06 07:31:48 bluhm Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -498,9 +498,6 @@ tcp_ctloutput(op, so, level, optname, mp)
(void) m_free(*mp);
return (ECONNRESET);
}
-#ifdef INET6
- tp = intotcpcb(inp);
-#endif /* INET6 */
if (level != IPPROTO_TCP) {
switch (so->so_proto->pr_domain->dom_family) {
#ifdef INET6
@@ -518,9 +515,7 @@ tcp_ctloutput(op, so, level, optname, mp)
splx(s);
return (error);
}
-#ifndef INET6
tp = intotcpcb(inp);
-#endif /* !INET6 */
switch (op) {