diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2015-11-18 13:45:51 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2015-11-18 13:45:51 +0300 |
commit | 1e505332a84bef2857f07155f0c188742303be76 (patch) | |
tree | 9f0c7a809f9d0a3ef19c0bcf3e039f6e8ad42b8a /accel-pppd | |
parent | ece89e96055e0de86bdfcd61650f266581285443 (diff) | |
download | accel-ppp-1e505332a84bef2857f07155f0c188742303be76.tar.gz accel-ppp-1e505332a84bef2857f07155f0c188742303be76.zip |
ipoe: do not apply "soft terminate" to UP sessions
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 3 | ||||
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 774e3980..61e040eb 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -1156,7 +1156,7 @@ static int ipoe_session_terminate(struct ap_session *s, int hard) { struct ipoe_session *ses = container_of(s, typeof(*ses), ses); - if (hard || !conf_soft_terminate) + if (hard || !conf_soft_terminate || ses->UP) ipoe_session_terminated(ses); else ses->terminate = 1; @@ -1798,6 +1798,7 @@ static struct ipoe_session *ipoe_session_create_up(struct ipoe_serv *serv, struc ses->serv = serv; memcpy(ses->hwaddr, eth->h_source, 6); ses->yiaddr = iph->saddr; + ses->UP = 1; ses->ctrl.called_station_id = _strdup(serv->ifname); diff --git a/accel-pppd/ctrl/ipoe/ipoe.h b/accel-pppd/ctrl/ipoe/ipoe.h index 6f590758..f2331039 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.h +++ b/accel-pppd/ctrl/ipoe/ipoe.h @@ -95,6 +95,7 @@ struct ipoe_session { int l4_redirect:1; int l4_redirect_set:1; int terminate:1; + int UP:1; }; struct ipoe_session_info { |