summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/ldpe.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2015-02-09 11:54:25 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2015-02-09 11:54:25 +0000
commitc5d8710aef1858f3aa34907b30ed45e8a41f3526 (patch)
tree0345ec05bbce291d5d3e4a417615b4474f1097f9 /usr.sbin/ldpd/ldpe.c
parent3095c52d572a03a6979f6420bdffbc52e343d9c5 (diff)
More SOCK_NONBLOCK | SOCK_CLOEXEC love and one less session_socket_blockmode
Diffstat (limited to 'usr.sbin/ldpd/ldpe.c')
-rw-r--r--usr.sbin/ldpd/ldpe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c
index e3323d9d4d9..01efffb9789 100644
--- a/usr.sbin/ldpd/ldpe.c
+++ b/usr.sbin/ldpd/ldpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpe.c,v 1.25 2014/11/18 20:54:28 krw Exp $ */
+/* $OpenBSD: ldpe.c,v 1.26 2015/02/09 11:54:24 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -154,7 +154,8 @@ ldpe(struct ldpd_conf *xconf, int pipe_parent2ldpe[2], int pipe_ldpe2lde[2],
sess_addr.sin_port = htons(LDP_PORT);
sess_addr.sin_addr.s_addr = INADDR_ANY;
- if ((xconf->ldp_session_socket = socket(AF_INET, SOCK_STREAM,
+ if ((xconf->ldp_session_socket = socket(AF_INET,
+ SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC,
IPPROTO_TCP)) == -1)
fatal("error creating session socket");
@@ -172,7 +173,6 @@ ldpe(struct ldpd_conf *xconf, int pipe_parent2ldpe[2], int pipe_ldpe2lde[2],
if (if_set_tos(xconf->ldp_session_socket,
IPTOS_PREC_INTERNETCONTROL) == -1)
fatal("if_set_tos");
- session_socket_blockmode(xconf->ldp_session_socket, BM_NONBLOCK);
if ((pw = getpwnam(LDPD_USER)) == NULL)
fatal("getpwnam");