diff options
author | venaas <venaas> | 2007-09-18 15:31:28 +0000 |
---|---|---|
committer | venaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf> | 2007-09-18 15:31:28 +0000 |
commit | c0206480f4ca51770abbd138cddd919d5d7ec166 (patch) | |
tree | d00e9ee6d760a89b2c069acbe406a242cf75eb4c /radsecproxy.c | |
parent | 7dd66d70b0470b76b44eb5416f143f080789b27a (diff) |
prefix/prefixlen for udp clients
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@160 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r-- | radsecproxy.c | 7 |
1 files 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; |