On 4/9/19 5:08 PM, Govindarajulu Varadarajan wrote: > On Fri, Apr 5, 2019 at 4:32 PM David Ahern <dsah...@kernel.org> wrote: >> >> From: David Ahern <dsah...@gmail.com> >> >> fib_check_nh is currently huge covering multiple uses cases - device only, >> device + gateway, and device + gateway with ONLINK. The next patch adds >> validation checks for IPv6 which only further complicates it. So, break >> fib_check_nh into 2 helpers - one for gateway validation and one for device >> only. >> >> Signed-off-by: David Ahern <dsah...@gmail.com> >> Reviewed-by: Ido Schimmel <ido...@mellanox.com> > > With the latest net-next I am having issue with network traffic. > git bisect points to this commit as the first bad commit. > (448d7248191706cbbd7761e3bc72c2985c4d38a7 ipv4: Refactor fib_check_nh) >
Can you see if this fixes it? whitespace damaged, but fairly simple to apply manually: diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 017273885eee..779d2be2b135 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -616,8 +616,9 @@ static int fib_get_nhs(struct fib_info *fi, struct rtnexthop *rtnh, return -EINVAL; } if (nla) { - fib_cfg.fc_gw_family = AF_INET; fib_cfg.fc_gw4 = nla_get_in_addr(nla); + if (fib_cfg.fc_gw4) + fib_cfg.fc_gw_family = AF_INET; } else if (nlav) { ret = fib_gw_from_via(&fib_cfg, nlav, extack); if (ret)