From c0206480f4ca51770abbd138cddd919d5d7ec166 Mon Sep 17 00:00:00 2001 From: venaas Date: Tue, 18 Sep 2007 15:31:28 +0000 Subject: prefix/prefixlen for udp clients git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@160 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- radsecproxy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/radsecproxy.c b/radsecproxy.c index 7c27d82..4126312 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -381,7 +381,8 @@ unsigned char *radudpget(int s, struct client **client, struct server **server, struct sockaddr_storage from; socklen_t fromlen = sizeof(from); struct clsrvconf *p; - + struct list_node *node; + for (;;) { cnt = recvfrom(s, buf, sizeof(buf), 0, (struct sockaddr *)&from, &fromlen); if (cnt == -1) { @@ -431,8 +432,8 @@ unsigned char *radudpget(int s, struct client **client, struct server **server, } if (client && !*client) { - if (!p->clients) - *client = addclient(p); + node = p->clients ? list_first(p->clients) : NULL; + *client = node ? (struct client *)node->data : addclient(p); if (!*client) { free(rad); continue; -- cgit v1.1