projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41f8259
)
find_client: min prefix of 0 needs to work
author
Sam Hartman
<hartmans@debian.org>
Thu, 10 Jul 2014 11:41:09 +0000
(07:41 -0400)
committer
Alan T. DeKok
<aland@freeradius.org>
Thu, 10 Jul 2014 16:07:27 +0000
(12:07 -0400)
Use signed loop counter to permit 0-1 to be <= min_prefix
src/main/client.c
patch
|
blob
|
history
diff --git
a/src/main/client.c
b/src/main/client.c
index
4888642
..
d8759fd
100644
(file)
--- a/
src/main/client.c
+++ b/
src/main/client.c
@@
-367,7
+367,7
@@
RADCLIENT *client_findbynumber(UNUSED const RADCLIENT_LIST *clients, UNUSED int
*/
RADCLIENT *client_find(RADCLIENT_LIST const *clients, fr_ipaddr_t const *ipaddr, int proto)
{
-
u
int32_t i, max_prefix;
+ int32_t i, max_prefix;
RADCLIENT myclient;
if (!clients) clients = root_clients;
@@
-387,7
+387,7
@@
RADCLIENT *client_find(RADCLIENT_LIST const *clients, fr_ipaddr_t const *ipaddr,
return NULL;
}
- for (i = max_prefix; i >= clients->min_prefix; i--) {
+ for (i = max_prefix; i >=
(int32_t)
clients->min_prefix; i--) {
void *data;
myclient.ipaddr = *ipaddr;