summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ripd/interface.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2015-02-09 12:13:42 +0000
committerclaudio <claudio@openbsd.org>2015-02-09 12:13:42 +0000
commit33229c10ed6c320049b860171d9d5b83ec676501 (patch)
treed6f6e8c43c6d3efb176e9fb3dc8b8dd9bd639a89 /usr.sbin/ripd/interface.c
parentprovide a net.inet6.ip6.ifq sysctl so people can see and fiddle (diff)
downloadwireguard-openbsd-33229c10ed6c320049b860171d9d5b83ec676501.tar.xz
wireguard-openbsd-33229c10ed6c320049b860171d9d5b83ec676501.zip
More session_socket_blockmode() removal. While there make the main UDP
socket non-blocking by default.
Diffstat (limited to 'usr.sbin/ripd/interface.c')
-rw-r--r--usr.sbin/ripd/interface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ripd/interface.c b/usr.sbin/ripd/interface.c
index d3ae7799f14..65e5667578b 100644
--- a/usr.sbin/ripd/interface.c
+++ b/usr.sbin/ripd/interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.c,v 1.11 2011/07/04 04:34:14 claudio Exp $ */
+/* $OpenBSD: interface.c,v 1.12 2015/02/09 12:13:42 claudio Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -405,7 +405,8 @@ if_new(struct kif *kif)
/* set up ifreq */
strlcpy(ifr->ifr_name, kif->ifname, sizeof(ifr->ifr_name));
- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+ if ((s = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
+ 0)) < 0)
err(1, "if_new: socket");
/* get type */