diff options
| author | xebd <xeb@mail.ru> | 2022-04-21 10:32:52 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-21 10:32:52 +0300 |
| commit | 85beb6bf4f1df582d54f2d8d83b08d434a485f2e (patch) | |
| tree | fc0c5c93d158423fc201d524f80ef2b534a1efda /accel-pppd/radius/req.c | |
| parent | 27c90ac33294146bd061c74a0e38e2506646b090 (diff) | |
| parent | 6f5f75e70ce10dd41c47af8a3b4b179813020d4c (diff) | |
| download | accel-ppp-85beb6bf4f1df582d54f2d8d83b08d434a485f2e.tar.gz accel-ppp-85beb6bf4f1df582d54f2d8d83b08d434a485f2e.zip | |
Merge pull request #45 from svlobanov/nas-port-id
add switch to disable sending NAS-Port-Id
Diffstat (limited to 'accel-pppd/radius/req.c')
| -rw-r--r-- | accel-pppd/radius/req.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c index 688a6b2a..11abf8cb 100644 --- a/accel-pppd/radius/req.c +++ b/accel-pppd/radius/req.c @@ -89,8 +89,10 @@ static struct rad_req_t *__rad_req_alloc(struct radius_pd_t *rpd, int code, cons if (rpd->ses->unit_idx != -1 && rad_packet_add_int(req->pack, NULL, "NAS-Port", rpd->ses->unit_idx)) goto out_err; - if (*rpd->ses->ifname && rad_packet_add_str(req->pack, NULL, "NAS-Port-Id", rpd->ses->ifname)) - goto out_err; + if (conf_nas_port_id_in_req) { + if (*rpd->ses->ifname && rad_packet_add_str(req->pack, NULL, "NAS-Port-Id", rpd->ses->ifname)) + goto out_err; + } if (req->rpd->ses->ctrl->type == CTRL_TYPE_IPOE) { if (rad_packet_add_val(req->pack, NULL, "NAS-Port-Type", "Ethernet")) |
