diff options
author | Kozlov Dmitry <dima@server> | 2010-09-23 09:54:52 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-23 09:54:52 +0400 |
commit | 82b0f0953159fc9ab8e387f5e6014dc377b14b38 (patch) | |
tree | 974bf5ff111aed10829c4326d627c9e26d7f2189 /accel-pptpd/radius/req.c | |
parent | 3e61cb3f8d58f64c8023e95bf74341e6bc61560e (diff) | |
download | accel-ppp-82b0f0953159fc9ab8e387f5e6014dc377b14b38.tar.gz accel-ppp-82b0f0953159fc9ab8e387f5e6014dc377b14b38.zip |
radius: implemented attributes Calling-Station-Id, Called-Station-Id, NAS-IP-Address
radius: implemented extension Acct-Input-Gigawords, Acct-Output-Gigawords
lcp: implemented maximum/minimum mtu/mru checks
Diffstat (limited to 'accel-pptpd/radius/req.c')
-rw-r--r-- | accel-pptpd/radius/req.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/accel-pptpd/radius/req.c b/accel-pptpd/radius/req.c index 6b812f11..cd4a31be 100644 --- a/accel-pptpd/radius/req.c +++ b/accel-pptpd/radius/req.c @@ -52,6 +52,9 @@ struct rad_req_t *rad_req_alloc(struct radius_pd_t *rpd, int code, const char *u if (conf_nas_identifier) if (rad_packet_add_str(req->pack, "NAS-Identifier", conf_nas_identifier, strlen(conf_nas_identifier))) goto out_err; + if (conf_nas_ip_address) + if (rad_packet_add_ipaddr(req->pack, "NAS-IP-Address", inet_addr(conf_nas_ip_address))) + goto out_err; if (rad_packet_add_int(req->pack, "NAS-Port", rpd->ppp->unit_idx)) goto out_err; if (rad_packet_add_val(req->pack, "NAS-Port-Type", "Virtual")) @@ -60,6 +63,12 @@ struct rad_req_t *rad_req_alloc(struct radius_pd_t *rpd, int code, const char *u goto out_err; if (rad_packet_add_val(req->pack, "Framed-Protocol", "PPP")) goto out_err; + if (rpd->ppp->ctrl->calling_station_id) + if (rad_packet_add_str(req->pack, "Calling-Station-Id", rpd->ppp->ctrl->calling_station_id, strlen(rpd->ppp->ctrl->calling_station_id))) + goto out_err; + if (rpd->ppp->ctrl->called_station_id) + if (rad_packet_add_str(req->pack, "Called-Station-Id", rpd->ppp->ctrl->called_station_id, strlen(rpd->ppp->ctrl->called_station_id))) + goto out_err; return req; @@ -91,6 +100,10 @@ int rad_req_acct_fill(struct rad_req_t *req) return -1; if (rad_packet_add_int(req->pack, "Acct-Output-Packets", 0)) return -1; + if (rad_packet_add_int(req->pack, "Acct-Input-Gigawords", 0)) + return -1; + if (rad_packet_add_int(req->pack, "Acct-Output-Gigawords", 0)) + return -1; return 0; } |