summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timewait.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2004-08-12 18:19:36 +0000
committerdwmalone <dwmalone@FreeBSD.org>2004-08-12 18:19:36 +0000
commit874318f896fe5914a4a5abf339191cd6cf785132 (patch)
tree9d972b33d332d207ffa8fc0277a258f0c5fca702 /sys/netinet/tcp_timewait.c
parent74889f1a203a54c8d1820b9c5e296eecefaa72bd (diff)
downloadFreeBSD-src-874318f896fe5914a4a5abf339191cd6cf785132.zip
FreeBSD-src-874318f896fe5914a4a5abf339191cd6cf785132.tar.gz
In tcp6_ctlinput, lock tcbinfo around the call to syncache_unreach
so that the locks held are the same as the IPv4 case. Reviewed by: rwatson
Diffstat (limited to 'sys/netinet/tcp_timewait.c')
-rw-r--r--sys/netinet/tcp_timewait.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index cab3e6b..2d29844 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -1245,7 +1245,9 @@ tcp6_ctlinput(cmd, sa, d)
inc.inc6_faddr = ((struct sockaddr_in6 *)sa)->sin6_addr;
inc.inc6_laddr = ip6cp->ip6c_src->sin6_addr;
inc.inc_isipv6 = 1;
+ INP_INFO_WLOCK(&tcbinfo);
syncache_unreach(&inc, &th);
+ INP_INFO_WUNLOCK(&tcbinfo);
} else
in6_pcbnotify(&tcbinfo, sa, 0, (const struct sockaddr *)sa6_src,
0, cmd, NULL, notify);
OpenPOWER on IntegriCloud