diff options
author | Kozlov Dmitry <dima@server> | 2010-11-09 10:45:19 +0300 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-11-09 10:45:19 +0300 |
commit | ea29f31e5b072ea1247a18bbecb9e2f47a36bc72 (patch) | |
tree | 6f515df8fb680d2443c2b7efcd9941a1b21e29a8 /accel-pptpd/radius/auth.c | |
parent | 1396b7c22bbd319fc22ee420c14cdb69f8d5203c (diff) | |
download | accel-ppp-xebd-ea29f31e5b072ea1247a18bbecb9e2f47a36bc72.tar.gz accel-ppp-xebd-ea29f31e5b072ea1247a18bbecb9e2f47a36bc72.zip |
radius: send Acct-Session-Id in Access-Request packet if sid_in_auth option is set (for broken billings)
Diffstat (limited to 'accel-pptpd/radius/auth.c')
-rw-r--r-- | accel-pptpd/radius/auth.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/accel-pptpd/radius/auth.c b/accel-pptpd/radius/auth.c index 352da70..2d17b67 100644 --- a/accel-pptpd/radius/auth.c +++ b/accel-pptpd/radius/auth.c @@ -192,6 +192,10 @@ int rad_auth_pap(struct radius_pd_t *rpd, const char *username, va_list args) _free(epasswd); + if (conf_sid_in_auth) + if (rad_packet_add_str(req->pack, "Acct-Session-Id", rpd->ppp->sessionid, PPP_SESSIONID_LEN)) + return -1; + r = rad_auth_send(req); if (r == PWDB_SUCCESS) { struct ev_radius_t ev = { @@ -260,6 +264,10 @@ int rad_auth_chap_md5(struct radius_pd_t *rpd, const char *username, va_list arg return -1; } + if (conf_sid_in_auth) + if (rad_packet_add_str(rpd->auth_req->pack, "Acct-Session-Id", rpd->ppp->sessionid, PPP_SESSIONID_LEN)) + goto out; + r = rad_auth_send(rpd->auth_req); if (r == PWDB_SUCCESS) { struct ev_radius_t ev = { @@ -369,6 +377,10 @@ int rad_auth_mschap_v1(struct radius_pd_t *rpd, const char *username, va_list ar return -1; } + if (conf_sid_in_auth) + if (rad_packet_add_str(rpd->auth_req->pack, "Acct-Session-Id", rpd->ppp->sessionid, PPP_SESSIONID_LEN)) + goto out; + r = rad_auth_send(rpd->auth_req); if (r == PWDB_SUCCESS) { struct ev_radius_t ev = { @@ -440,6 +452,10 @@ int rad_auth_mschap_v2(struct radius_pd_t *rpd, const char *username, va_list ar return -1; } + if (conf_sid_in_auth) + if (rad_packet_add_str(rpd->auth_req->pack, "Acct-Session-Id", rpd->ppp->sessionid, PPP_SESSIONID_LEN)) + goto out; + r = rad_auth_send(rpd->auth_req); if (r == PWDB_SUCCESS) { ra = rad_packet_find_vendor_attr(rpd->auth_req->reply, "Microsoft", "MS-CHAP2-Success"); |