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, 8 Nov 2022 11:40:06 +0200
From:   Ido Schimmel <idosch@...sch.org>
To:     Hangbin Liu <liuhangbin@...il.com>
Cc:     netdev@...r.kernel.org, Guillaume Nault <gnault@...hat.com>,
        David Ahern <dsahern@...nel.org>,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCHv3 iproute2-next] rtnetlink: add new function
 rtnl_echo_talk()

On Tue, Nov 08, 2022 at 05:09:05PM +0800, Hangbin Liu wrote:
> On Tue, Nov 08, 2022 at 10:40:45AM +0200, Ido Schimmel wrote:
> > > +	return rtnl_talk(&rth, &req.n, NULL);
> > >  }
> > 
> > Hangbin,
> > 
> > This change breaks the nexthop selftest:
> > tools/testing/selftests/net/fib_nexthops.sh
> > 
> > Which is specifically checking for "2" as the error code. Example:
> 
> Hi Ido,
> 
> Thanks for the report.
> 
> > 
> > # attempt to create nh without a device or gw - fails
> > run_cmd "$IP nexthop add id 1"
> > log_test $? 2 "Nexthop with no device or gateway"
> > 
> > I think it's better to restore the original error code than "fixing" all
> > the tests / applications that rely on it.
> 
> I can fix this either in iproute2 or in the selftests.
> I'd perfer ask David's opinion.

Sure, but note that:

1. Other than the 4 selftests that we know about and can easily patch,
there might be a lot of other applications that invoke iproute2 and
expect this return code. It is used by iproute2 since at least 2004.

2. There is already precedence for restoring the original code. See
commit d58ba4ba2a53 ("ip: return correct exit code on route failure").

> 
> > 
> > The return code of other subcommands was also changed by this patch, but
> > so far all the failures I have seen are related to "nexthop" subcommand.
> 
> I grep "log_test \$? 2" in selftest/net folder and found the following tests
> would use it
> 
> fib_tests.sh
> test_vxlan_vnifiltering.sh
> fcnal-test.sh
> fib_nexthops.sh
> 
> Thanks
> Hangbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ