From 03f17173b68a6a84f4020c96905fe7af13633339 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/trunk@367 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- radsecproxy.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/radsecproxy.c b/radsecproxy.c index 4772442..35b0caa 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -1911,6 +1911,9 @@ int 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 1; @@ -2071,6 +2074,13 @@ 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)) { -- cgit v1.1