From 1ec94d1e688da57d08893684fd8af395c39f6715 Mon Sep 17 00:00:00 2001 From: venaas Date: Mon, 8 Sep 2008 08:46:23 +0000 Subject: now performing rewriteOut git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@367 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- radsecproxy.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/radsecproxy.c b/radsecproxy.c index 7bec114..727698d 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -1921,6 +1921,9 @@ void radsrv(struct request *rq) { rq->origid = id; memcpy(rq->origauth, auth, 16); memcpy(auth, newauth, 16); + + if (to->conf->rewriteout) + dorewrite(rq->buf, to->conf->rewriteout); sendrq(to, rq); return; @@ -2072,7 +2075,14 @@ int replyh(struct server *server, unsigned char *buf) { if (messageauth) messageauth = attrget(attrs, len, RAD_Attr_Message_Authenticator); } - + + if (from->conf->rewriteout) { + dorewrite(buf, from->conf->rewriteout); + len = RADLEN(buf) - 20; + if (messageauth) + messageauth = attrget(attrs, len, RAD_Attr_Message_Authenticator); + } + if (messageauth) { if (!createmessageauth(buf, ATTRVAL(messageauth), from->conf->secret)) { pthread_mutex_unlock(&server->newrq_mutex); -- cgit v1.1