summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/udp6_usrreq.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-10-12 20:01:32 +0000
committerrwatson <rwatson@FreeBSD.org>2008-10-12 20:01:32 +0000
commitfabec516f482d9cfeb2f19eb7015842751a3fe2e (patch)
tree2d914981440f1e52080e9bfda7488d7f913191fa /sys/netinet6/udp6_usrreq.c
parent06ac7ce6a0db88400c17ae0a5bb575fd259377bf (diff)
downloadFreeBSD-src-fabec516f482d9cfeb2f19eb7015842751a3fe2e.zip
FreeBSD-src-fabec516f482d9cfeb2f19eb7015842751a3fe2e.tar.gz
When disconnecting a UDPv6 socket, acquire the socket lock around the
changing of the so_state field, as is done in UDPv4. Remove XXX locking comment. MFC after: 3 days
Diffstat (limited to 'sys/netinet6/udp6_usrreq.c')
-rw-r--r--sys/netinet6/udp6_usrreq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index f85fe58..276af83 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -935,8 +935,9 @@ udp6_disconnect(struct socket *so)
in6_pcbdisconnect(inp);
inp->in6p_laddr = in6addr_any;
- /* XXXRW: so_state locking? */
+ SOCK_LOCK(so);
so->so_state &= ~SS_ISCONNECTED; /* XXX */
+ SOCK_UNLOCK(so);
out:
INP_WUNLOCK(inp);
INP_INFO_WUNLOCK(&V_udbinfo);
OpenPOWER on IntegriCloud