diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2008-05-05 12:33:56 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2008-05-05 12:33:56 +0000 |
commit | cf9ba403977c572e44daa06bd06a82e453d80aba (patch) | |
tree | 662dab030510097c4f6de4371a3f4c2cc3b37d57 | |
parent | 292cdc400bccb062d64f9c015bbbbae6436d1de7 (diff) |
Put relay sockets in non blocking mode too. This got forgotten along the
way and didn't show since our read buffers are small.
``put it in'' reyk@
-rw-r--r-- | usr.sbin/relayd/relay.c | 5 |
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; |