summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2008-09-08 08:46:23 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-09-08 08:46:23 +0000
commit03f17173b68a6a84f4020c96905fe7af13633339 (patch)
treed3e0a7e20d614fa7ac09e9a5a8d07bdf4e2a04ad
parent5410779f7b724fc2a4d3d3162fadf732bdfdff77 (diff)
now performing rewriteOut
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@367 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--radsecproxy.c10
1 files changed, 10 insertions, 0 deletions
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)) {