Commit c0206480 authored by venaas's avatar venaas Committed by venaas
Browse files

prefix/prefixlen for udp clients

git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@160 e88ac4ed-0b26-0410-9574-a7f39faa03bf
parent 7dd66d70
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment