diff options
Diffstat (limited to 'usr.sbin/ldpd/ldpe.c')
-rw-r--r-- | usr.sbin/ldpd/ldpe.c | 6 |
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"); |