diff options
author | venaas <venaas> | 2007-01-03 15:37:32 +0000 |
---|---|---|
committer | venaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf> | 2007-01-03 15:37:32 +0000 |
commit | 01acf7213070583f888764c59babb0972e352357 (patch) | |
tree | 8411dde5a493d76da87138c317a21e72e9442968 /radsecproxy.c | |
parent | ed7a4b2f1d9855cfbd73fa7cf30b2b811e9d2caf (diff) |
radsrv realm routing changes
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@19 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r-- | radsecproxy.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/radsecproxy.c b/radsecproxy.c index bbecffb..6aa204a 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -478,10 +478,13 @@ struct peer *id2peer(char *id, uint8_t len) { for (i = 0; i < peer_count; i++) { for (realm = peers[i].realms; *realm; realm++) { /* assume test@domain */ - printf("realmlength %d, usernamelenght %d\n", strlen(*realm), len); - if (strlen(*realm) == len - 5 && !memcmp(id + 5, *realm, len - 5)) { - printf("found matching realm: %s, host %s\n", *realm, peers[i].host); + printf("realmlength %d, usernamelength %d\n", strlen(*realm), len); + if (strlen(*realm) == len - 5) { + printf("lengths match\n"); + if (!memcmp(id + 5, *realm, len - 5)) { + printf("found matching realm: %s, host %s\n", *realm, peers[i].host); return peers + i; + } } } } |