diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2019-03-08 12:48:41 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2019-03-08 12:48:41 +0300 |
commit | fbac1573d3def4eef27e55272125242e5a1711e1 (patch) | |
tree | 3426e1bcd74605ad2444728eed819cac71fe11c4 | |
parent | 389a77c295562ce6c349a8977c0658064ef4f9e5 (diff) | |
download | accel-ppp-fbac1573d3def4eef27e55272125242e5a1711e1.tar.gz accel-ppp-fbac1573d3def4eef27e55272125242e5a1711e1.zip |
radius: fixed bug (inserting empty Class)
-rw-r--r-- | accel-pppd/radius/dm_coa.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/accel-pppd/radius/dm_coa.c b/accel-pppd/radius/dm_coa.c index ea9743d..f967ec6 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"); |