summaryrefslogtreecommitdiff
path: root/accel-pppd/radius
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2011-04-19 11:46:02 +0400
committerKozlov Dmitry <dima@server>2011-04-19 11:46:02 +0400
commitd4f6b13bcfb5c6245d39f5a71db199bac5a0a26f (patch)
treeee20fbbafece68ad38807e13652c2dd03d57d3e9 /accel-pppd/radius
parent859b328684c41f2ffdb0f14b0c480dad0075ef50 (diff)
downloadaccel-ppp-d4f6b13bcfb5c6245d39f5a71db199bac5a0a26f.tar.gz
accel-ppp-d4f6b13bcfb5c6245d39f5a71db199bac5a0a26f.zip
radius: auth_chap_md5: send chap challenge via CHAP-Challenge attribute too
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r--accel-pppd/radius/auth.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/accel-pppd/radius/auth.c b/accel-pppd/radius/auth.c
index 70ecbbe2..99e6e16d 100644
--- a/accel-pppd/radius/auth.c
+++ b/accel-pppd/radius/auth.c
@@ -253,20 +253,16 @@ int rad_auth_chap_md5(struct radius_pd_t *rpd, const char *username, va_list arg
if (challenge_len == 16)
memcpy(rpd->auth_req->RA, challenge, 16);
- else {
- if (rad_packet_add_octets(rpd->auth_req->pack, NULL, "CHAP-Challenge", challenge, challenge_len))
+ if (rad_packet_add_octets(rpd->auth_req->pack, NULL, "CHAP-Challenge", challenge, challenge_len))
goto out;
- }
if (rad_packet_add_octets(rpd->auth_req->pack, NULL, "CHAP-Password", chap_password, 17))
goto out;
} else {
if (challenge_len == 16)
memcpy(rpd->auth_req->RA, challenge, 16);
- else {
- if (rad_packet_change_octets(rpd->auth_req->pack, NULL, "CHAP-Challenge", challenge, challenge_len))
+ if (rad_packet_change_octets(rpd->auth_req->pack, NULL, "CHAP-Challenge", challenge, challenge_len))
goto out;
- }
if (rad_packet_change_octets(rpd->auth_req->pack, NULL, "CHAP-Password", chap_password, 17))
goto out;