summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/packet.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-04-15 15:04:24 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-04-15 15:04:24 +0000
commitc1819b1f795527a74b4694473fc2f99536b19b8e (patch)
tree63653833f6340c4e6ff929030c819724735d96d4 /usr.sbin/ldpd/packet.c
parent212b26394887ee3c41510adacde36bc5c0ebfa21 (diff)
Instead of having three ways of setting fds non-blocking use
session_socket_blockmode() everywhere. Additionally make two fatal() distinguishable. OK michele@
Diffstat (limited to 'usr.sbin/ldpd/packet.c')
-rw-r--r--usr.sbin/ldpd/packet.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c
index 7e7e1d46149..7e08cdf125b 100644
--- a/usr.sbin/ldpd/packet.c
+++ b/usr.sbin/ldpd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.5 2010/03/26 16:00:09 claudio Exp $ */
+/* $OpenBSD: packet.c,v 1.6 2010/04/15 15:04:23 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -283,10 +283,7 @@ session_accept(int fd, short event, void *bula)
return;
}
- if (fcntl(newfd, F_SETFL, O_NONBLOCK) == -1) {
- log_debug("sess_recv_packet: unable to set non blocking flag");
- return;
- }
+ session_socket_blockmode(newfd, BM_NONBLOCK);
if ((iface = session_find_iface(xconf, src.sin_addr)) == NULL) {
log_debug("sess_recv_packet: cannot find a matching interface");