summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-07-17 18:04:34 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-07-17 18:04:34 +0400
commitc6a2a1e18fff35738fac68ffc1e745576bb40a70 (patch)
tree50510d018ae0952ac3c2b7a8febeb6eccb902f0a /accel-pppd
parent35149a848e169a7717d30537b54770e513a34679 (diff)
downloadaccel-ppp-c6a2a1e18fff35738fac68ffc1e745576bb40a70.tar.gz
accel-ppp-c6a2a1e18fff35738fac68ffc1e745576bb40a70.zip
radius: check for reply id is equal request id in interim requests
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/radius/acct.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c
index 0c7a6759..5816e509 100644
--- a/accel-pppd/radius/acct.c
+++ b/accel-pppd/radius/acct.c
@@ -66,8 +66,6 @@ static int rad_acct_read(struct triton_md_handler_t *h)
struct rad_packet_t *pack;
int r;
unsigned int dt;
-
- rad_server_req_exit(req);
if (req->reply) {
rad_packet_free(req->reply);
@@ -95,6 +93,11 @@ static int rad_acct_read(struct triton_md_handler_t *h)
if (!req->reply)
return 0;
+ if (req->reply->id != req->pack->id)
+ return 0;
+
+ rad_server_req_exit(req);
+
dt = (req->reply->tv.tv_sec - req->pack->tv.tv_sec) * 1000 +
(req->reply->tv.tv_nsec - req->pack->tv.tv_nsec) / 1000000;