From: David Miller <davem@davemloft.net>
To: serhe.popovych@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: fib_rules: Resolve goto rules target on delete
Date: Tue, 20 Jun 2017 12:40:40 -0400 (EDT) [thread overview]
Message-ID: <20170620.124040.491492963882254347.davem@davemloft.net> (raw)
In-Reply-To: <1497617087-26386-1-git-send-email-serhe.popovych@gmail.com>
From: Serhey Popovych <serhe.popovych@gmail.com>
Date: Fri, 16 Jun 2017 15:44:47 +0300
> We should avoid marking goto rules unresolved when their
> target is actually reachable after rule deletion.
>
> Consolder following sample scenario:
>
> # ip -4 ru sh
> 0: from all lookup local
> 32000: from all goto 32100
> 32100: from all lookup main
> 32100: from all lookup default
> 32766: from all lookup main
> 32767: from all lookup default
>
> # ip -4 ru del pref 32100 table main
> # ip -4 ru sh
> 0: from all lookup local
> 32000: from all goto 32100 [unresolved]
> 32100: from all lookup default
> 32766: from all lookup main
> 32767: from all lookup default
>
> After removal of first rule with preference 32100 we
> mark all goto rules as unreachable, even when rule with
> same preference as removed one still present.
>
> Check if next rule with same preference is available
> and make all rules with goto action pointing to it.
>
> Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Applied, thanks.
It would be awesome if you could distill the above into a test case that
could be run under tools/testing/selftests/networking.
Thanks!
next prev parent reply other threads:[~2017-06-20 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 12:44 fib_rules: Resolve goto rules target on delete Serhey Popovych
2017-06-20 16:40 ` David Miller [this message]
2017-06-21 7:44 ` Serhey Popovych
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=20170620.124040.491492963882254347.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=serhe.popovych@gmail.com \
/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).