diff options
-rw-r--r-- | accel-cmd/accel_cmd.c | 2 | ||||
-rw-r--r-- | accel-pppd/radius/radius.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/accel-cmd/accel_cmd.c b/accel-cmd/accel_cmd.c index e0ca7d4..273a2dd 100644 --- a/accel-cmd/accel_cmd.c +++ b/accel-cmd/accel_cmd.c @@ -645,7 +645,7 @@ int main(int argc, char **argv) bool numeric = false; int inputstream = -1; int oindx = 0; - char ochar; + int ochar; int rv; while ((ochar = getopt_long(argc, argv, "f:46ni:H:p:t:P:vVh-", diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c index e5a65a5..e3fe4b3 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; |