summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index b4a0e1a..6abfb30 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -802,6 +802,12 @@ static void __ipoe_session_activate(struct ipoe_session *ses)
if (ses->ifindex == -1) {
if (ses->serv->opt_ifcfg || (ses->serv->opt_mode == MODE_L2))
ipoe_ifcfg_add(ses);
+
+ ipoe_nl_add_exclude(ses->yiaddr, 32);
+
+ iproute_add(ses->serv->ifindex, ses->siaddr, ses->yiaddr, conf_proto);
+
+ ses->ctrl.dont_ifcfg = 1;
} else if (ses->ctrl.dont_ifcfg)
ipaddr_add(ses->ifindex, ses->siaddr, ses->mask);
@@ -976,7 +982,8 @@ static void ipoe_session_finished(struct ap_session *s)
pthread_mutex_unlock(&uc_lock);
} else
ipoe_nl_delete(ses->ifindex);
- }
+ } else
+ ipoe_nl_del_exclude(ses->yiaddr);
if (ses->dhcp_addr)
dhcpv4_put_ip(ses->serv->dhcpv4, ses->yiaddr);