summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2015-11-18 12:54:59 +0300
committerDmitry Kozlov <xeb@mail.ru>2015-11-18 12:54:59 +0300
commita4178f4732bcad5e8ca43ff500afa08b31c3a020 (patch)
treebf568d6b55832939c198598138990008213ae90f
parentdd6a897125a984498536466174426b18ed870bcc (diff)
downloadaccel-ppp-a4178f4732bcad5e8ca43ff500afa08b31c3a020.tar.gz
accel-ppp-a4178f4732bcad5e8ca43ff500afa08b31c3a020.zip
ipoe: add route to client only in L3 mode
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 59ea87f9..9d42ce50 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -927,7 +927,8 @@ static void __ipoe_session_activate(struct ipoe_session *ses)
ipoe_nl_add_exclude(ses->yiaddr, 32);
- iproute_add(ses->serv->ifindex, ses->siaddr, ses->yiaddr, 0, conf_proto);
+ if (ses->serv->opt_mode == MODE_L3)
+ iproute_add(ses->serv->ifindex, ses->siaddr, ses->yiaddr, 0, conf_proto);
ses->ctrl.dont_ifcfg = 1;
} else if (ses->ctrl.dont_ifcfg && ses->serv->opt_mode == MODE_L2)