From acc53d157ba6b69ca038e6d21be60ce75334f477 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Fri, 25 May 2018 12:46:11 +0300 Subject: ipoe: do not remove address on session finish if ifcfg=1 --- accel-pppd/ctrl/ipoe/ipoe.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'accel-pppd/ctrl') diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index f5a00ca..acfc62c 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -1164,12 +1164,12 @@ static void ipoe_session_finished(struct ap_session *s) } else ipoe_nl_delete(ses->ifindex); } else if (ses->started) { - if (serv->opt_ifcfg) - ipaddr_del(serv->ifindex, ses->router, conf_ip_unnumbered ? 32 : ses->mask); - else if (conf_ip_unnumbered) - iproute_del(serv->ifindex, ses->yiaddr, conf_proto, 32, 0); - else - iproute_del(serv->ifindex, ses->yiaddr, conf_proto, ses->mask, 0); + if (!serv->opt_ifcfg) { + if (conf_ip_unnumbered) + iproute_del(serv->ifindex, ses->yiaddr, conf_proto, 32, 0); + else + iproute_del(serv->ifindex, ses->yiaddr, conf_proto, ses->mask, 0); + } } if (ses->dhcp_addr) -- cgit v1.2.3