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:   Fri, 25 Oct 2019 12:24:22 +0200
From:   Paolo Abeni <pabeni@...hat.com>
To:     David Ahern <dsahern@...il.com>, netdev@...r.kernel.org
Cc:     Beniamino Galvani <bgalvani@...hat.com>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net] ipv4: fix route update on metric change.

On Thu, 2019-10-24 at 09:50 -0600, David Ahern wrote:
> On 10/24/19 3:19 AM, Paolo Abeni wrote:
> > Since commit af4d768ad28c ("net/ipv4: Add support for specifying metric
> > of connected routes"), when updating an IP address with a different metric,
> > the associated connected route is updated, too.
> > 
> > Still, the mentioned commit doesn't handle properly some corner cases:
> > 
> > $ ip addr add dev eth0 192.168.1.0/24
> > $ ip addr add dev eth0 192.168.2.1/32 peer 192.168.2.2
> > $ ip addr add dev eth0 192.168.3.1/24
> > $ ip addr change dev eth0 192.168.1.0/24 metric 10
> > $ ip addr change dev eth0 192.168.2.1/32 peer 192.168.2.2 metric 10
> > $ ip addr change dev eth0 192.168.3.1/24 metric 10
> > $ ip -4 route
> > 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.0
> > 192.168.2.2 dev eth0 proto kernel scope link src 192.168.2.1
> > 192.168.3.0/24 dev eth0 proto kernel scope link src 192.168.2.1 metric 10
> 
> Please add this test and route checking to
> tools/testing/selftests/net/fib_tests.sh. There is a
> ipv4_addr_metric_test function that handles permutations and I guess the
> above was missed.

Do you prefer a net-next patch for that, or a repost on -net with a
separate patch for the self-test appended?

> Also, does a similar sequence for IPv6 work as expected?

Just tested, it works without issue, It looks like IPv6 has not special
handing connected route with peers/128 bit masks.

Thank you,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ