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]
Message-ID: <Y3+V9gu4NUQ7P0mL@shredder>
Date:   Thu, 24 Nov 2022 18:04:06 +0200
From:   Ido Schimmel <idosch@...sch.org>
To:     Jonas Gorski <jonas.gorski@...il.com>
Cc:     Network Development <netdev@...r.kernel.org>,
        David Ahern <dsahern@...nel.org>
Subject: Re: RTM_DELROUTE not sent anymore when deleting (last) nexthop of
 routes in 6.1

On Thu, Nov 24, 2022 at 04:20:49PM +0100, Jonas Gorski wrote:
> We have an integration test using FRR that got broken by this, so I
> can also easily test anything you throw at me (assuming CET working
> hours).

Please test the following fix [1]. Tested manually using [2]. With the
fix or 61b91eb33a69 reverted the route is successfully deleted. Without
the fix I get:

RTNETLINK answers: No such process
198.51.100.0/24 nhid 1 via 192.0.2.2 dev dummy10

If the fix is OK, I will submit it along with a selftest to make
sure it does not regress in the future.

Thanks

[1]
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index f721c308248b..19a662003eef 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -888,9 +888,11 @@ int fib_nh_match(struct net *net, struct fib_config *cfg, struct fib_info *fi,
                return 1;
        }
 
-       /* cannot match on nexthop object attributes */
-       if (fi->nh)
-               return 1;
+       if (fi->nh) {
+               if (cfg->fc_oif || cfg->fc_gw_family || cfg->fc_mp)
+                       return 1;
+               return 0;
+       }
 
        if (cfg->fc_oif || cfg->fc_gw_family) {
                struct fib_nh *nh;

[2]
#!/bin/bash

ip link del dev dummy10 &> /dev/null

ip link add name dummy10 up type dummy
ip address add 192.0.2.1/24 dev dummy10
ip nexthop add id 1 via 192.0.2.2 dev dummy10
ip route add 198.51.100.0/24 nhid 1
ip route del 198.51.100.0/24
ip route show 198.51.100.0/24

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ