summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2007-01-03 15:42:08 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-01-03 15:42:08 +0000
commitfabfb78abfd614a755c7e0a2d145b1c073e768ce (patch)
treec5e2b8bd2549a57fa9c22d88f24691fd85d4b26b
parent01acf7213070583f888764c59babb0972e352357 (diff)
radsrv realm routing changes
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@20 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 6aa204a..59eb316 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -479,12 +479,9 @@ struct peer *id2peer(char *id, uint8_t len) {
for (realm = peers[i].realms; *realm; realm++) {
/* assume test@domain */
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);
+ if (strlen(*realm) == len - 5 && !memcmp(id + 5, *realm, len - 5)) {
+ printf("found matching realm: %s, host %s\n", *realm, peers[i].host);
return peers + i;
- }
}
}
}