[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ=AEwbQ=w-wrKZJpaVCSX_TJyfE3xqwT_TLwMWr+ahNDq47sA@mail.gmail.com>
Date: Tue, 9 Apr 2019 22:31:25 -0700
From: Govindarajulu Varadarajan <govind.varadar@...il.com>
To: David Ahern <dsahern@...il.com>
Cc: David Ahern <dsahern@...nel.org>, davem@...emloft.net,
netdev@...r.kernel.org, idosch@...lanox.com, jiri@...lanox.com,
benve@...co.com, govind.varadar@...il.com
Subject: Re: [PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh
On Tue, Apr 9, 2019 at 7:13 PM David Ahern <dsahern@...il.com> wrote:
>
> On 4/9/19 5:08 PM, Govindarajulu Varadarajan wrote:
> > On Fri, Apr 5, 2019 at 4:32 PM David Ahern <dsahern@...nel.org> wrote:
> >>
> >> From: David Ahern <dsahern@...il.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 <dsahern@...il.com>
> >> Reviewed-by: Ido Schimmel <idosch@...lanox.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)
This did not work.
However this worked
@@ -1096,7 +1096,7 @@ static int fib_check_nh(struct fib_config *cfg,
struct fib_nh *nh,
u32 table = cfg->fc_table;
int err;
- if (nh->fib_nh_gw_family == AF_INET)
+ if (nh->fib_nh_gw4)
err = fib_check_nh_v4_gw(net, nh, table, cfg->fc_scope, extack);
else if (nh->fib_nh_gw_family == AF_INET6)
err = fib_check_nh_v6_gw(net, nh, table, extack);
Powered by blists - more mailing lists