From fbac1573d3def4eef27e55272125242e5a1711e1 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Fri, 8 Mar 2019 12:48:41 +0300 Subject: radius: fixed bug (inserting empty Class) --- accel-pppd/radius/dm_coa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/accel-pppd/radius/dm_coa.c b/accel-pppd/radius/dm_coa.c index ea9743d9..f967ec64 100644 --- a/accel-pppd/radius/dm_coa.c +++ b/accel-pppd/radius/dm_coa.c @@ -173,13 +173,13 @@ static void coa_request(struct radius_pd_t *rpd) memcpy(rpd->attr_class, class->val.octets, class->len); rpd->attr_class_len = class->len; - } - if (rpd->acct_req && rpd->acct_req->pack) { - if (prev_class) - rad_packet_change_octets(rpd->acct_req->pack, NULL, "Class", rpd->attr_class, rpd->attr_class_len); - else - rad_packet_add_octets(rpd->acct_req->pack, NULL, "Class", rpd->attr_class, rpd->attr_class_len); + if (rpd->acct_req && rpd->acct_req->pack) { + if (prev_class) + rad_packet_change_octets(rpd->acct_req->pack, NULL, "Class", rpd->attr_class, rpd->attr_class_len); + else + rad_packet_add_octets(rpd->acct_req->pack, NULL, "Class", rpd->attr_class, rpd->attr_class_len); + } } attr = rad_packet_find_attr(rpd->dm_coa_req, NULL, "Session-Timeout"); -- cgit v1.2.3