netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Gorski <jonas.gorski@gmail.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: Network Development <netdev@vger.kernel.org>,
	David Ahern <dsahern@kernel.org>
Subject: Re: RTM_DELROUTE not sent anymore when deleting (last) nexthop of routes in 6.1
Date: Thu, 24 Nov 2022 17:58:47 +0100	[thread overview]
Message-ID: <CAOiHx=mKo_r-JTF0wtg3Aw+6-yvyorkm28GG1Dwp3viFg3x5NA@mail.gmail.com> (raw)
In-Reply-To: <Y3+V9gu4NUQ7P0mL@shredder>

On Thu, 24 Nov 2022 at 17:04, Ido Schimmel <idosch@idosch.org> wrote:
>
> 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;

I can confirm this fixes the issue. Reading the code, this is
basically like it was before the commit with an additional return 1
for (fi->nh && cfg->fc_mp).

Thanks for the quick fix! Here, have a

Tested-by: Jonas Gorski <jonas.gorski@gmail.com>

Regards
Jonas

  reply	other threads:[~2022-11-24 16:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  9:20 RTM_DELROUTE not sent anymore when deleting (last) nexthop of routes in 6.1 Jonas Gorski
2022-11-24 12:41 ` Ido Schimmel
2022-11-24 14:15   ` Jonas Gorski
2022-11-24 14:40     ` Jonas Gorski
2022-11-24 14:50       ` Ido Schimmel
2022-11-24 15:20         ` Jonas Gorski
2022-11-24 16:04           ` Ido Schimmel
2022-11-24 16:58             ` Jonas Gorski [this message]
2022-11-25  3:53   ` David Ahern
2022-11-25  8:36 ` RTM_DELROUTE not sent anymore when deleting (last) nexthop of routes in 6.1 #forregzbot Thorsten Leemhuis
2022-11-27 12:08   ` Thorsten Leemhuis
2022-11-29  8:50     ` Thorsten Leemhuis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOiHx=mKo_r-JTF0wtg3Aw+6-yvyorkm28GG1Dwp3viFg3x5NA@mail.gmail.com' \
    --to=jonas.gorski@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=idosch@idosch.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).