[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190802041358.GT18865@dhcp-12-139.nay.redhat.com>
Date: Fri, 2 Aug 2019 12:13:58 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: David Ahern <dsahern@...il.com>
Cc: netdev@...r.kernel.org, Stefano Brivio <sbrivio@...hat.com>,
Marcelo Ricardo Leitner <mleitner@...hat.com>,
"David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH net] ipv4/route: do not check saddr dev if iif is
LOOPBACK_IFINDEX
On Thu, Aug 01, 2019 at 01:51:25PM -0600, David Ahern wrote:
> On 8/1/19 2:29 AM, Hangbin Liu wrote:
> > Jianlin reported a bug that for IPv4, ip route get from src_addr would fail
> > if src_addr is not an address on local system.
> >
> > \# ip route get 1.1.1.1 from 2.2.2.2
> > RTNETLINK answers: Invalid argument
>
> so this is a forwarding lookup in which case iif should be set. Based on
with out setting iif in userspace, the kernel set iif to lo by default.
> the above 'route get' inet_rtm_getroute is doing a lookup as if it is
> locally generated traffic.
yeah... but what about the IPv6 part. That cause a different behavior in
userspace.
Thanks
Hangbin
Powered by blists - more mailing lists