diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2004-06-22 04:00:51 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2004-06-22 04:00:51 +0000 |
commit | bb7479a61338ab56364381914f79c2d94746711b (patch) | |
tree | 4a2316f346b906e3827f7df655a7dd48a6274ee7 /sys/netinet/ip_divert.c | |
parent | ffcbc0e4c577f01e17b8bea03753f7c5edc6d4c3 (diff) | |
download | src-bb7479a61338ab56364381914f79c2d94746711b.tar.gz src-bb7479a61338ab56364381914f79c2d94746711b.zip |
Acquire socket lock around frobbing of socket state in divert sockets.
Notes
Notes:
svn path=/head/; revision=130901
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r-- | sys/netinet/ip_divert.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 1f8bb4851276..ef4bb85a5d16 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -419,7 +419,9 @@ div_attach(struct socket *so, int proto, struct thread *td) /* The socket is always "connected" because we always know "where" to send the packet */ INP_UNLOCK(inp); + SOCK_LOCK(so); so->so_state |= SS_ISCONNECTED; + SOCK_UNLOCK(so); return 0; } |