diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-03-18 15:31:54 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-03-18 15:31:54 +0400 |
commit | df6157aee109d7642a9c8c054bc9778f04007f05 (patch) | |
tree | 757da8bfdfd66f2b972a56a06be6cd914fa1ff54 /accel-pppd/ctrl/ipoe | |
parent | f44b0e79a6d6ec32ec7e449c89ff98ba3fe5f472 (diff) | |
download | accel-ppp-df6157aee109d7642a9c8c054bc9778f04007f05.tar.gz accel-ppp-df6157aee109d7642a9c8c054bc9778f04007f05.zip |
ipoe: early drop routes when dropping sessions (V2)
Diffstat (limited to 'accel-pppd/ctrl/ipoe')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index e7c91b1..6d5345e 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -576,6 +576,9 @@ static void __ipoe_session_activate(struct ipoe_session *ses) { uint32_t addr; + if (ses->terminating) + return; + if (ses->ifindex != -1) { addr = 0; if (!ses->ses.ipv4) @@ -1296,11 +1299,18 @@ static void ipoe_drop_sessions(struct ipoe_serv *serv, struct ipoe_session *skip if (ses == skip) continue; + ses->terminating = 1; + if (ses->ifcfg) { + ipoe_ifcfg_del(ses); + ses->ifcfg = 0; + } + if (ses->ses.state == AP_STATE_ACTIVE) ap_session_ifdown(&ses->ses); triton_context_call(&ses->ctx, (triton_event_func)__terminate, &ses->ses); } + } struct ipoe_serv *ipoe_find_serv(const char *ifname) |