diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-07-30 12:22:15 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-07-30 12:22:15 +0000 |
commit | 89f7541319ef9160e488b939e82c46161f181457 (patch) | |
tree | f5fe4b6682f7d21d11e8c57de615677c759ba3e2 /sys/net/bfd.c | |
parent | ddc839531265c523fcba2ffe6f2c3faece95a538 (diff) |
Use FNONBLOCK instead of SS_NBIO to check/indicate that the I/O mode
for sockets is non-blocking.
This allows us to G/C SS_NBIO. Having to keep the two flags in sync
in a mp-safe way is complicated.
This change introduce a behavior change in sosplice(), it can now
always block. However this should not matter much due to the socket
lock being taken beforhand.
ok bluhm@, benno@, visa@
Diffstat (limited to 'sys/net/bfd.c')
-rw-r--r-- | sys/net/bfd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/bfd.c b/sys/net/bfd.c index e6c8ce34a42..9c5ad224d70 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.71 2018/06/06 06:55:22 mpi Exp $ */ +/* $OpenBSD: bfd.c,v 1.72 2018/07/30 12:22:14 mpi Exp $ */ /* * Copyright (c) 2016-2018 Peter Hessler <phessler@openbsd.org> @@ -250,14 +250,14 @@ bfd_clear_task(void *arg) if (bfd->bc_so) { /* remove upcall before calling soclose or it will be called */ bfd->bc_so->so_upcall = NULL; - soclose(bfd->bc_so); + soclose(bfd->bc_so, MSG_DONTWAIT); } if (bfd->bc_soecho) { bfd->bc_soecho->so_upcall = NULL; - soclose(bfd->bc_soecho); + soclose(bfd->bc_soecho, MSG_DONTWAIT); } if (bfd->bc_sosend) - soclose(bfd->bc_sosend); + soclose(bfd->bc_sosend, MSG_DONTWAIT); rtfree(bfd->bc_rt); bfd->bc_rt = NULL; @@ -495,7 +495,7 @@ bfd_listener(struct bfd_config *bfd, unsigned int port) close: m_free(m); - soclose(so); + soclose(so, MSG_DONTWAIT); return (NULL); } @@ -624,7 +624,7 @@ bfd_sender(struct bfd_config *bfd, unsigned int port) close: m_free(m); - soclose(so); + soclose(so, MSG_DONTWAIT); return (NULL); } |