summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/ppp/ppp.c1
-rw-r--r--accel-pppd/radius/radius.c3
-rw-r--r--accel-pppd/session.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c
index 6c80b9c..fec330f 100644
--- a/accel-pppd/ppp/ppp.c
+++ b/accel-pppd/ppp/ppp.c
@@ -163,7 +163,6 @@ int __export connect_ppp_channel(struct ppp_t *ppp)
fcntl(ppp->unit_fd, F_SETFD, fcntl(ppp->unit_fd, F_GETFD) | FD_CLOEXEC);
- ppp->ses.unit_idx = -1;
if (ioctl(ppp->unit_fd, PPPIOCNEWUNIT, &ppp->ses.unit_idx) < 0) {
log_ppp_error("ioctl(PPPIOCNEWUNIT): %s\n", strerror(errno));
goto exit_close_unit;
diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c
index 83d6d07..9b211be 100644
--- a/accel-pppd/radius/radius.c
+++ b/accel-pppd/radius/radius.c
@@ -146,6 +146,9 @@ int rad_proc_attrs(struct rad_req_t *req)
a->addr = attr->val.ipv6prefix.prefix;
list_add_tail(&a->entry, &rpd->ipv6_dp.prefix_list);
break;
+ case NAS_Port:
+ rpd->ses->unit_idx = attr->val.integer;
+ break;
case NAS_Port_Id:
ap_session_rename(rpd->ses, attr->val.string, attr->len);
break;
diff --git a/accel-pppd/session.c b/accel-pppd/session.c
index 12e4fc2..dd7ffd4 100644
--- a/accel-pppd/session.c
+++ b/accel-pppd/session.c
@@ -61,6 +61,7 @@ void __export ap_session_init(struct ap_session *ses)
memset(ses, 0, sizeof(*ses));
INIT_LIST_HEAD(&ses->pd_list);
ses->ifindex = -1;
+ ses->unit_idx = -1;
}
void __export ap_session_set_ifindex(struct ap_session *ses)