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
This commit is contained in:
Robert Watson 2008-10-12 20:01:32 +00:00
parent f17c6f031e
commit a6a6167314

View File

@ -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);