summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/relay.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/relayd/relay.c')
-rw-r--r--usr.sbin/relayd/relay.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c
index f2d76e6f1fc..edb66a83fda 100644
--- a/usr.sbin/relayd/relay.c
+++ b/usr.sbin/relayd/relay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay.c,v 1.87 2008/03/21 05:22:11 reyk Exp $ */
+/* $OpenBSD: relay.c,v 1.88 2008/05/05 12:33:55 pyr Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -1884,6 +1884,9 @@ relay_accept(int fd, short sig, void *arg)
rlay->rl_conf.flags & F_DISABLE)
goto err;
+ if (fcntl(s, F_SETFL, O_NONBLOCK) == -1)
+ goto err;
+
if ((con = (struct session *)
calloc(1, sizeof(struct session))) == NULL)
goto err;