From 925199165169cec79f4a46475b79914cb556ac7c Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 8 Aug 2017 18:51:58 +0300 Subject: ipoe: add client ip as route when nat=1 --- accel-pppd/ctrl/ipoe/ipoe.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'accel-pppd') diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 84519f03..d8e95e3d 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) { -- cgit v1.2.3