diff options
author | Kozlov Dmitry <dima@server> | 2011-08-16 18:11:12 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2011-08-16 18:11:12 +0400 |
commit | fd52e4578dcc7de2301480fece9395563d643045 (patch) | |
tree | f0fade621eee24248f19334759a159ace5dc0665 | |
parent | 3b04c12e021c35d71d8b690b54b7f96ce6a24576 (diff) | |
download | accel-ppp-fd52e4578dcc7de2301480fece9395563d643045.tar.gz accel-ppp-fd52e4578dcc7de2301480fece9395563d643045.zip |
multiple radius support (testing)
-rw-r--r-- | accel-pppd/accel-ppp.conf | 5 | ||||
-rw-r--r-- | accel-pppd/accel-ppp.conf.5 | 9 | ||||
-rw-r--r-- | accel-pppd/radius/acct.c | 18 | ||||
-rw-r--r-- | accel-pppd/radius/req.c | 6 |
4 files changed, 23 insertions, 15 deletions
diff --git a/accel-pppd/accel-ppp.conf b/accel-pppd/accel-ppp.conf index 1630ae17..1dc6bd2a 100644 --- a/accel-pppd/accel-ppp.conf +++ b/accel-pppd/accel-ppp.conf @@ -68,8 +68,9 @@ verbose=1 nas-identifier=accel-ppp nas-ip-address=127.0.0.1 gw-ip-address=192.168.100.1 -auth-server=127.0.0.1:1812,testing123 -acct-server=127.0.0.1:1813,testing123 +#auth-server=127.0.0.1:1812,testing123 (obsolete) +#acct-server=127.0.0.1:1813,testing123 (obsolete) +server=127.0.0.1,testing123 dae-server=127.0.0.1:3799,testing123 verbose=1 #timeout=3 diff --git a/accel-pppd/accel-ppp.conf.5 b/accel-pppd/accel-ppp.conf.5 index 76c32a70..aee13547 100644 --- a/accel-pppd/accel-ppp.conf.5 +++ b/accel-pppd/accel-ppp.conf.5 @@ -262,10 +262,15 @@ Also DM/CoA server will bind to that address. Specifies address to use as local address of ppp interfaces if Framed-IP-Address received from RADIUS server. .TP .BI "auth-server=" x.x.x.x:port,secret -Specifies IP address, port and secret of authentication RADIUS server. +Specifies IP address, port and secret of authentication RADIUS server. (obsolete) .TP .BI "acct-server=" x.x.x.x:port,secret -Specifies IP address, port and secret of accounting RADIUS server. +Specifies IP address, port and secret of accounting RADIUS server. (obsolete) +.TP +.BI "server=" address,secret[,auth-port[,acct-port]] +Specifies IP address, ports and secret of RADIUS server. +If you want to specify only authentication or accounting server then set auth-port/acct-port to zero. +You may specify multiple radius servers. .TP .BI "dae-server=" x.x.x.x:port,secret Specifies IP address, port to bind and secret for Dynamic Authorization Extension server (DM/CoA). diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c index 66dcbb4e..4f1d9018 100644 --- a/accel-pppd/radius/acct.c +++ b/accel-pppd/radius/acct.c @@ -304,16 +304,16 @@ int rad_acct_start(struct radius_pd_t *rpd) rad_server_req_exit(rpd->acct_req); - if (!rpd->acct_req->reply) { - rad_server_fail(rpd->acct_req->serv); - if (rad_server_realloc(rpd->acct_req, 1)) { - log_ppp_warn("radius:acct_start: no servers available\n"); - goto out_err; - } - if (req_set_RA(rpd->acct_req, rpd->acct_req->serv->acct_secret)) - goto out_err; - } else + if (rpd->acct_req->reply) break; + + rad_server_fail(rpd->acct_req->serv); + if (rad_server_realloc(rpd->acct_req, 1)) { + log_ppp_warn("radius:acct_start: no servers available\n"); + goto out_err; + } + if (req_set_RA(rpd->acct_req, rpd->acct_req->serv->acct_secret)) + goto out_err; } rpd->acct_req->hnd.read = rad_acct_read; diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c index f3d72f83..b45a601b 100644 --- a/accel-pppd/radius/req.c +++ b/accel-pppd/radius/req.c @@ -126,8 +126,10 @@ int rad_req_acct_fill(struct rad_req_t *req) return -1; if (rad_packet_add_int(req->pack, NULL, "Acct-Output-Gigawords", 0)) return -1; - if (rad_packet_add_int(req->pack, NULL, "Acct-Delay-Time", 0)) - return -1; + if (conf_acct_delay_time) { + 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; |