summaryrefslogtreecommitdiff
path: root/radsecproxy.c
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
commit1ec94d1e688da57d08893684fd8af395c39f6715 (patch)
tree8fc2d231c5d703bbe0e7761448e0b9aa42745c41 /radsecproxy.c
parentc24b12498ab137851e4cdd4035060c54134e9c5b (diff)
now performing rewriteOut
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@367 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c12
1 files changed, 11 insertions, 1 deletions
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);