commit fe3edf45792a ("ipv4: Remove all RTCF_DIRECTSRC handliing.").
Before this commit, we had a tristate: < 0: error 0: ok 1: ok and set RTCF_DIRECTSRC But now we only care about 0 or < 0. Signed-off-by: Xin Long <lucien....@gmail.com> --- net/ipv4/fib_frontend.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index d7c2bb0..f5c74d8 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c @@ -376,22 +376,14 @@ static int __fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst, if (FIB_RES_DEV(res) == dev) dev_match = true; #endif - if (dev_match) { - ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST; - return ret; - } + if (dev_match) + return 0; if (no_addr) goto last_resort; if (rpf == 1) goto e_rpf; - fl4.flowi4_oif = dev->ifindex; - ret = 0; - if (fib_lookup(net, &fl4, &res, FIB_LOOKUP_IGNORE_LINKSTATE) == 0) { - if (res.type == RTN_UNICAST) - ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST; - } - return ret; + return 0; last_resort: if (rpf) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html