summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d/ospf6d.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ospf6d/ospf6d.c')
-rw-r--r--usr.sbin/ospf6d/ospf6d.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/ospf6d/ospf6d.c b/usr.sbin/ospf6d/ospf6d.c
index 1f18fc5270f..e4cacc72743 100644
--- a/usr.sbin/ospf6d/ospf6d.c
+++ b/usr.sbin/ospf6d/ospf6d.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospf6d.c,v 1.26 2015/01/16 06:40:19 deraadt Exp $ */
+/* $OpenBSD: ospf6d.c,v 1.27 2015/02/10 05:39:10 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -224,19 +224,15 @@ main(int argc, char *argv[])
log_info("startup");
- if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC,
- pipe_parent2ospfe) == -1)
+ if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
+ PF_UNSPEC, pipe_parent2ospfe) == -1)
fatal("socketpair");
- if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_parent2rde) == -1)
+ if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
+ PF_UNSPEC, pipe_parent2rde) == -1)
fatal("socketpair");
- if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_ospfe2rde) == -1)
+ if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
+ PF_UNSPEC, pipe_ospfe2rde) == -1)
fatal("socketpair");
- session_socket_blockmode(pipe_parent2ospfe[0], BM_NONBLOCK);
- session_socket_blockmode(pipe_parent2ospfe[1], BM_NONBLOCK);
- session_socket_blockmode(pipe_parent2rde[0], BM_NONBLOCK);
- session_socket_blockmode(pipe_parent2rde[1], BM_NONBLOCK);
- session_socket_blockmode(pipe_ospfe2rde[0], BM_NONBLOCK);
- session_socket_blockmode(pipe_ospfe2rde[1], BM_NONBLOCK);
/* start children */
rde_pid = rde(ospfd_conf, pipe_parent2rde, pipe_ospfe2rde,