summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2007-06-19 13:33:29 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-06-19 13:33:29 +0000
commit9114cdf0d4a0fdd385f7798d0a6686b0551d3a6a (patch)
treeb42f3c79b028f36259a5dd04c74dd862dccc5a5b
parent3f30abb022a5b35a6808e013fe9024b19df3cfbe (diff)
fixed another bug, thanks Hans
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@146 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 7b7675c..63c8c8b 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1602,8 +1602,9 @@ int tlslistener() {
int s, snew;
struct sockaddr_storage from;
size_t fromlen = sizeof(from);
+ struct clsrvconf *conf;
struct client *client;
-
+
if ((s = bindtoaddr(tcp_server_listen->addrinfo)) < 0)
debugx(1, DBG_ERR, "tlslistener: socket/bind failed");
@@ -1619,13 +1620,14 @@ int tlslistener() {
}
debug(DBG_WARN, "incoming TLS connection from %s", addr2string((struct sockaddr *)&from, fromlen));
- client = find_peer('T', (struct sockaddr *)&from, clconfs, clconf_count)->clients;
- if (!client) {
+ conf = find_peer('T', (struct sockaddr *)&from, clconfs, clconf_count);
+ if (!conf) {
debug(DBG_WARN, "ignoring request, not a known TLS client");
shutdown(snew, SHUT_RDWR);
close(snew);
continue;
}
+ client = conf->clients;
if (client->ssl) {
debug(DBG_WARN, "Ignoring incoming TLS connection, already have one from this client");