summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2007-02-08 09:46:01 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-02-08 09:46:01 +0000
commit6c2d661206627bc4f64ba0f7f200ff97642b8048 (patch)
tree8d88e8fae04589ea7894ecbc1e74ffa21eb0f1fa
parent299ac96ae105ab0eb4585f4684e79f50ae6b35b6 (diff)
minor changes
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@49 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 73e5035..742c6b6 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -9,13 +9,6 @@
/* TODO:
* accounting
* radius keep alives (server status)
- * tls certificate validation, see below urls
- * clean tls shutdown, see http://www.linuxjournal.com/article/4822
- * and http://www.linuxjournal.com/article/5487
- * SSL_shutdown() and shutdown()
- * If shutdown() we may not need REUSEADDR
- * when tls client goes away, ensure that all related threads and state
- * are removed
* setsockopt(keepalive...), check if openssl has some keepalive feature
*/
@@ -404,11 +397,13 @@ void tlsconnect(struct server *server, struct timeval *when, char *text) {
sleep(10);
} else if (elapsed < 5)
sleep(10);
- else if (elapsed < 600)
- sleep(elapsed * 2);
- else if (elapsed < 10000)
- sleep(900);
- else
+ else if (elapsed < 600) {
+ printf("tlsconnect: sleeping %lds\n", elapsed);
+ sleep(elapsed);
+ } else if (elapsed < 1000) {
+ printf("tlsconnect: sleeping %ds\n", 900);
+ sleep(900);
+ } else
server->lastconnecttry.tv_sec = now.tv_sec; // no sleep at startup
printf("tlsconnect: trying to open TLS connection to %s port %s\n", server->peer.host, server->peer.port);
if (server->sock >= 0)
@@ -1123,6 +1118,8 @@ void *clientrd(void *arg) {
printf("clientrd: discarding, only accept access accept, access reject and access challenge messages\n");
continue;
}
+
+ printf("got message type: %d, id: %d\n", buf[0], buf[1]);
i = buf[1]; /* i is the id */
@@ -1147,7 +1144,6 @@ void *clientrd(void *arg) {
from = server->requests[i].from;
-
/* messageauthattr present? */
messageauthattr = NULL;
left = RADLEN(buf) - 20;