diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-02-10 01:03:55 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-02-10 01:03:55 +0000 |
commit | 58e7284e058a405f4c64cc5cae05aeb7690fefd0 (patch) | |
tree | 13caab574f26dd0280fd8e883a05cace4851a022 /usr.sbin/ldpd/kroute.c | |
parent | 8eec68f3ff95989c8fd1d405d473731a433110d6 (diff) |
Pass SOCK_NONBLOCK | SOCK_CLOEXEC to some more sockets. We never want to
sleep on a socket.
Diffstat (limited to 'usr.sbin/ldpd/kroute.c')
-rw-r--r-- | usr.sbin/ldpd/kroute.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/kroute.c b/usr.sbin/ldpd/kroute.c index 8ae9ad4fde9..7fa083b6956 100644 --- a/usr.sbin/ldpd/kroute.c +++ b/usr.sbin/ldpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.34 2015/01/16 06:40:17 deraadt Exp $ */ +/* $OpenBSD: kroute.c,v 1.35 2015/02/10 01:03:54 claudio Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -154,7 +154,8 @@ kr_init(int fs) kr_state.fib_sync = fs; - if ((kr_state.fd = socket(AF_ROUTE, SOCK_RAW, 0)) == -1) { + if ((kr_state.fd = socket(AF_ROUTE, + SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)) == -1) { log_warn("kr_init: socket"); return (-1); } |