提交 7a1b1120 编写于 作者: D Dmitry Kozlov

ipoe: early drop routes when dropping sessions (V3)

上级 0052d20e
......@@ -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,6 +1299,12 @@ 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);
......
......@@ -56,6 +56,7 @@ struct ipoe_session
int ifindex;
struct ipv4db_item_t ipv4;
int ifcfg:1;
int terminating:1;
int dhcp_addr:1;
int relay_addr:1;
int l4_redirect:1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册