summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe/ipoe.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2015-11-18 13:45:51 +0300
committerDmitry Kozlov <xeb@mail.ru>2015-11-18 13:45:51 +0300
commit1e505332a84bef2857f07155f0c188742303be76 (patch)
tree9f0c7a809f9d0a3ef19c0bcf3e039f6e8ad42b8a /accel-pppd/ctrl/ipoe/ipoe.c
parentece89e96055e0de86bdfcd61650f266581285443 (diff)
downloadaccel-ppp-1e505332a84bef2857f07155f0c188742303be76.tar.gz
accel-ppp-1e505332a84bef2857f07155f0c188742303be76.zip
ipoe: do not apply "soft terminate" to UP sessions
Diffstat (limited to 'accel-pppd/ctrl/ipoe/ipoe.c')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 774e398..61e040e 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);