lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 9 Apr 2019 19:13:06 -0700
From:   David Ahern <dsahern@...il.com>
To:     Govindarajulu Varadarajan <govind.varadar@...il.com>,
        David Ahern <dsahern@...nel.org>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, idosch@...lanox.com,
        jiri@...lanox.com, benve@...co.com
Subject: Re: [PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh

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)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ