summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2007-01-03 15:27:58 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-01-03 15:27:58 +0000
commitecb8dc6b2ea0685293878321ab4c9fd558ce1fb6 (patch)
treed11d5aeb8d856965d81d151db58b186c70d6a7fe
parent623465adb658a9aed954a3da9118f3a29aa92806 (diff)
radsrv realm routing changes
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@17 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 99dd652..9ab9d81 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -479,7 +479,7 @@ struct peer *id2peer(char *id, uint8_t len) {
for (realm = peers[i].realms; *realm; realm++) {
/* assume test@domain */
printf("realmlength %d, usernamelenght %d\n", strlen(*realm), len);
- if (strlen(*realm) == len && !memcmp(id + 5, *realm, len)) {
+ if (strlen(*realm) == len && !memcmp(id + 5, *realm, len - 5)) {
printf("found matching realm: %s, host %s\n", *realm, peers[i].host);
return peers + i;
}