diff options
author | stetsyuk <52718548+stetsyuk@users.noreply.github.com> | 2020-04-02 11:17:28 +0300 |
---|---|---|
committer | Stetsyuk Vladislav <admin@kustosoft.com> | 2020-04-02 13:00:50 +0300 |
commit | a00278542122641b82cd0ba74c5f232099de182a (patch) | |
tree | ce35660baf7b1b456d39b1dd26e1b4df8d5595af /accel-pppd/radius | |
parent | 7afe0f075676219ab4b9e8dbfed294992e9f360b (diff) | |
download | accel-ppp-a00278542122641b82cd0ba74c5f232099de182a.tar.gz accel-ppp-a00278542122641b82cd0ba74c5f232099de182a.zip |
Fix radius Framed-IP-Address
Add htonl to check if Framed-IP-Address==0xFFFFFFFE
Ignore 0xFFFFFFFE as Framed-IP-Address in DM/CoA requests
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r-- | accel-pppd/radius/radius.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c index e5a65a56..e3fe4b3f 100644 --- a/accel-pppd/radius/radius.c +++ b/accel-pppd/radius/radius.c @@ -316,7 +316,7 @@ int rad_proc_attrs(struct rad_req_t *req) case Framed_IP_Address: if (!conf_gw_ip_address && rpd->ses->ctrl->ppp) log_ppp_warn("radius: gw-ip-address not specified, cann't assign IP address...\n"); - else if (attr->val.ipaddr != 0xfffffffe) { + else if (attr->val.ipaddr != htonl(0xfffffffe)) { rpd->ipv4_addr.owner = &ipdb; rpd->ipv4_addr.peer_addr = attr->val.ipaddr; rpd->ipv4_addr.addr = rpd->ses->ctrl->ppp ? conf_gw_ip_address : 0; @@ -817,7 +817,8 @@ struct radius_pd_t *rad_find_session_pack(struct rad_packet_t *pack) port_id = attr->val.string; break; case Framed_IP_Address: - ipaddr = attr->val.ipaddr; + if (attr->val.ipaddr != htonl(0xfffffffe)) + ipaddr = attr->val.ipaddr; break; case Calling_Station_Id: csid = attr->val.string; |