From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05408C433FE for ; Thu, 24 Nov 2022 16:04:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229563AbiKXQEO (ORCPT ); Thu, 24 Nov 2022 11:04:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiKXQEO (ORCPT ); Thu, 24 Nov 2022 11:04:14 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 467211CFE8 for ; Thu, 24 Nov 2022 08:04:13 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id F13D85C00C5; Thu, 24 Nov 2022 11:04:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 24 Nov 2022 11:04:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1669305850; x=1669392250; bh=SJFiCo+vmdPavID5t9cPzNlj6UDs m3rBnIS7KfRjC5U=; b=QNtXbqgHs6WT8pcoQ7YFhf/0W3z1ltdU9bB7vPxfcpET f3lmrAnku4LtKk9bA4BJ82C4+RfkfRcG9YBKbR9XvU82+m7Uq11QKo5zAOEa1ibw 9ZSjlYrcOjlegOJgNTu9zqd5TkgtaOk7/2BtzKpwiXSAhHjJB3PxJZBBnwFb7PgQ nnTj5aeL9yJ/oqA5/H8NwvWBkXit5I0tQW6a3b+EH7LVaygzv7V7pc/wPNvAvD5J qLiwYglzSdFhafc+Liss/8+9voCiILXr9NpLscr4b+mZ31TctzWJWeU3J0XeifsO 5yBq6KoIctqLeMltw8cvRKZ4HbtJ/iI9cyPnl0OWtQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieefgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedvudefveekheeugeeftddvveefgfduieefudeifefgleekheegleegjeejgeeg hfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiug hoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Nov 2022 11:04:09 -0500 (EST) Date: Thu, 24 Nov 2022 18:04:06 +0200 From: Ido Schimmel To: Jonas Gorski Cc: Network Development , David Ahern Subject: Re: RTM_DELROUTE not sent anymore when deleting (last) nexthop of routes in 6.1 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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