From d77cd69ead5f587ed85fb7b4e1190c9f1ab9743a Mon Sep 17 00:00:00 2001 From: venaas Date: Wed, 3 Jan 2007 14:54:52 +0000 Subject: radsrv realm routing changes git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@12 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- radsecproxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'radsecproxy.c') diff --git a/radsecproxy.c b/radsecproxy.c index b34ac11..d480b5d 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -529,7 +529,7 @@ struct peer *radsrv(struct request *rq, char *buf, struct peer *from) { for (i = 0; i < peer_count; i++) { for (realm = peers[i].realms; realm; realm++) { /* assume test@domain */ - if (!memcmp(usernameattr + 5, *realm, usernameattr[RAD_Attr_Length] - 5)) { + if (strlen(*realm) == usernameattr[RAD_Attr_Length] - 5 && !memcmp(usernameattr + 5, *realm, strlen(*realm))) { printf("found matching realm: %s, host %s\n", *realm, peers[i].host); break; } -- cgit v1.1