diff options
author | Kozlov Dmitry <dima@server> | 2011-08-23 18:02:22 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2011-08-23 18:02:22 +0400 |
commit | 9bc3fa4216fb2ad043232584b5a5e134e64830ed (patch) | |
tree | 910b5a0809a272d8525ff1ed2c1265b7f7d53c3d /accel-pppd/radius | |
parent | e281cbf20eb2e8f36ef5037e138fdf3798f1897d (diff) | |
download | accel-ppp-9bc3fa4216fb2ad043232584b5a5e134e64830ed.tar.gz accel-ppp-9bc3fa4216fb2ad043232584b5a5e134e64830ed.zip |
ppp: ipv6: multiple prefixes, route option, rdnss option implementation
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r-- | accel-pppd/radius/radius.c | 4 | ||||
-rw-r--r-- | accel-pppd/radius/req.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c index ae5948b0..4200d621 100644 --- a/accel-pppd/radius/radius.c +++ b/accel-pppd/radius/radius.c @@ -174,7 +174,7 @@ static struct ipv4db_item_t *get_ipv4(struct ppp_t *ppp) static struct ipv6db_item_t *get_ipv6(struct ppp_t *ppp) { - struct radius_pd_t *rpd = find_pd(ppp); + //struct radius_pd_t *rpd = find_pd(ppp); //if (memcmp(&rpd->ipv6_addr.peer_addr, &in6addr_any, sizeof(in6addr_any))) // return &rpd->ipv6_addr; @@ -302,7 +302,7 @@ struct radius_pd_t *rad_find_session(const char *sessionid, const char *username continue; if (port_id >= 0 && port_id != rpd->ppp->unit_idx) continue; - if (ipaddr && ipaddr != rpd->ppp->peer_ipaddr) + if (ipaddr && rpd->ppp->ipv4 && ipaddr != rpd->ppp->ipv4->peer_addr) continue; if (csid && rpd->ppp->ctrl->calling_station_id && strcmp(csid, rpd->ppp->ctrl->calling_station_id)) continue; diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c index b45a601b..462e656b 100644 --- a/accel-pppd/radius/req.c +++ b/accel-pppd/radius/req.c @@ -130,8 +130,10 @@ int rad_req_acct_fill(struct rad_req_t *req) if (rad_packet_add_int(req->pack, NULL, "Acct-Delay-Time", 0)) return -1; } - if (rad_packet_add_ipaddr(req->pack, NULL, "Framed-IP-Address", req->rpd->ppp->peer_ipaddr)) - return -1; + if (req->rpd->ppp->ipv4) { + if (rad_packet_add_ipaddr(req->pack, NULL, "Framed-IP-Address", req->rpd->ppp->ipv4->peer_addr)) + return -1; + } return 0; } |