fixed bug in find_conf
authorvenaas <venaas>
Thu, 24 Apr 2008 09:49:17 +0000 (09:49 +0000)
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>
Thu, 24 Apr 2008 09:49:17 +0000 (09:49 +0000)
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@242 e88ac4ed-0b26-0410-9574-a7f39faa03bf

radsecproxy.c

index 8011797..b6e634b 100644 (file)
@@ -389,7 +389,7 @@ struct clsrvconf *find_conf(char type, struct sockaddr *addr, struct list *confs
     } else
        a4 = &((struct sockaddr_in *)addr)->sin_addr;
 
-    for (entry = (*cur ? list_next(*cur) : list_first(confs)); entry; entry = list_next(entry)) {
+    for (entry = (cur && *cur ? list_next(*cur) : list_first(confs)); entry; entry = list_next(entry)) {
        conf = (struct clsrvconf *)entry->data;
        if (conf->type == type) {
            if (conf->prefixlen == 255) {