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 the above 'route get' inet_rtm_getroute is doing a lookup as if it is locally generated traffic.