artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6720337
)
relay_connect() may fail, close the session in the bindany callback
author
reyk
<reyk@openbsd.org>
Wed, 16 Jul 2008 15:02:19 +0000
(15:02 +0000)
committer
reyk
<reyk@openbsd.org>
Wed, 16 Jul 2008 15:02:19 +0000
(15:02 +0000)
if it does.
usr.sbin/relayd/relay.c
patch
|
blob
|
history
diff --git
a/usr.sbin/relayd/relay.c
b/usr.sbin/relayd/relay.c
index
baa9f69
..
21cbc69
100644
(file)
--- a/
usr.sbin/relayd/relay.c
+++ b/
usr.sbin/relayd/relay.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: relay.c,v 1.9
3 2008/07/16 14:49:44
reyk Exp $ */
+/* $OpenBSD: relay.c,v 1.9
4 2008/07/16 15:02:19
reyk Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@
-2178,7
+2178,8
@@
relay_bindany(int fd, short event, void *arg)
return;
}
- relay_connect((struct session *)con);
+ if (relay_connect((struct session *)con) == -1)
+ relay_close(con, "session failed");
}
int