summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorvenaas <venaas>2008-07-15 12:54:53 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-07-15 12:54:53 +0000
commit27dfc5e75bd7de75e1c25a3b247cf270315ead1b (patch)
tree95003269dbd2f3a9c1ff0f648e2069e0887a2b50 /radsecproxy.c
parent84ebd8d6eeaf469b518ae04a53c30d1ddbe84e4f (diff)
UDP accounting replies with correct source port
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@301 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 99332c1..b671cb7 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -2314,7 +2314,8 @@ void *udpserverwr(void *arg) {
}
pthread_mutex_unlock(&replyq->mutex);
- if (sendto(udp_server_sock, reply->buf, RADLEN(reply->buf), 0,
+ if (sendto(*(uint8_t *)reply->buf == RAD_Accounting_Response ? udp_accserver_sock : udp_server_sock,
+ reply->buf, RADLEN(reply->buf), 0,
(struct sockaddr *)&reply->tosa, SOCKADDR_SIZE(reply->tosa)) < 0)
debug(DBG_WARN, "sendudp: send failed");
free(reply->buf);