diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-06-14 21:32:27 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-06-21 13:14:40 +0000 |
commit | 46d8116cae6845be70230640f16568576269b177 (patch) | |
tree | 6ac9452745f90f3ad290c6bba42ada658ca97768 /sys/rpc | |
parent | 4a77ce73eadfe7ceddc3f2330028880b886401fd (diff) | |
download | src-46d8116cae6845be70230640f16568576269b177.tar.gz src-46d8116cae6845be70230640f16568576269b177.zip |
Consistently use the SOLISTENING() macro
Some code was using it already, but in many places we were testing
SO_ACCEPTCONN directly. As a small step towards fixing some bugs
involving synchronization with listen(2), make the kernel consistently
use SOLISTENING(). No functional change intended.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit f4bb1869ddd2bca89b6b6bfaf4d866efdd9243cf)
Diffstat (limited to 'sys/rpc')
-rw-r--r-- | sys/rpc/svc_vc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c index 6cff3434364d..67951108b01c 100644 --- a/sys/rpc/svc_vc.c +++ b/sys/rpc/svc_vc.c @@ -329,7 +329,7 @@ svc_vc_accept(struct socket *head, struct socket **sop) short nbio; /* XXXGL: shouldn't that be an assertion? */ - if ((head->so_options & SO_ACCEPTCONN) == 0) { + if (!SOLISTENING(head)) { error = EINVAL; goto done; } |