diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2017-08-08 18:51:58 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2017-08-08 18:51:58 +0300 |
commit | 925199165169cec79f4a46475b79914cb556ac7c (patch) | |
tree | 31a462a6886350e26d510ecc58fdc0f129341986 | |
parent | fbaeb8c496404b6b4ca26a572441e48a0db14c32 (diff) | |
download | accel-ppp-925199165169cec79f4a46475b79914cb556ac7c.tar.gz accel-ppp-925199165169cec79f4a46475b79914cb556ac7c.zip |
ipoe: add client ip as route when nat=1
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 84519f0..d8e95e3 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -1018,6 +1018,9 @@ static void ipoe_session_started(struct ap_session *s) if (ses->timer.tpd) triton_timer_mod(&ses->timer, 0); + if (ses->ses.ipv4->peer_addr != ses->yiaddr) + iproute_add(ses->ses.ifindex, ses->router, ses->yiaddr, 0, conf_proto, 32); + if (ses->ifindex != -1 && ses->xid) { ses->dhcpv4 = dhcpv4_create(ses->ctrl.ctx, ses->ses.ifname, ""); if (!ses->dhcpv4) { |