summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-08-25 17:24:43 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-08-25 17:24:43 +0400
commit0f036dcf3085880ef18786abf40f5d2e6c1b97fc (patch)
tree973058ce3329fd7ebb23fa97536b395277170088 /accel-pppd/ctrl
parent1def743e8dd5b2eaaa0b1d3e4b5c4d9f400b915a (diff)
downloadaccel-ppp-0f036dcf3085880ef18786abf40f5d2e6c1b97fc.tar.gz
accel-ppp-0f036dcf3085880ef18786abf40f5d2e6c1b97fc.zip
ipoe: add route to interface in mode "start=up,shared=0"
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);