From: David Miller <davem@davemloft.net>
To: liuhangbin@gmail.com
Cc: netdev@vger.kernel.org, mateusz.bajorski@nokia.com,
dsa@cumulusnetworks.com
Subject: Re: [PATCH net] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied
Date: Wed, 08 May 2019 09:35:41 -0700 (PDT) [thread overview]
Message-ID: <20190508.093541.1274244477886053907.davem@davemloft.net> (raw)
In-Reply-To: <20190507091118.24324-1-liuhangbin@gmail.com>
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Tue, 7 May 2019 17:11:18 +0800
> With commit 153380ec4b9 ("fib_rules: Added NLM_F_EXCL support to
> fib_nl_newrule") we now able to check if a rule already exists. But this
> only works with iproute2. For other tools like libnl, NetworkManager,
> it still could add duplicate rules with only NLM_F_CREATE flag, like
>
> [localhost ~ ]# ip rule
> 0: from all lookup local
> 32766: from all lookup main
> 32767: from all lookup default
> 100000: from 192.168.7.5 lookup 5
> 100000: from 192.168.7.5 lookup 5
>
> As it doesn't make sense to create two duplicate rules, let's just return
> 0 if the rule exists.
>
> Fixes: 153380ec4b9 ("fib_rules: Added NLM_F_EXCL support to fib_nl_newrule")
> Reported-by: Thomas Haller <thaller@redhat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Applied and queued up for -stable, thanks.
next prev parent reply other threads:[~2019-05-08 16:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 9:11 [PATCH net] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied Hangbin Liu
2019-05-08 16:35 ` David Miller [this message]
2019-06-01 1:43 ` Maciej Żenczykowski
2019-06-01 9:32 ` Greg KH
2019-06-05 1:43 ` Hangbin Liu
2019-06-05 1:47 ` Lorenzo Colitti
2019-06-05 2:15 ` Hangbin Liu
2019-06-05 2:25 ` Lorenzo Colitti
2019-06-05 3:29 ` Hangbin Liu
2019-06-05 3:43 ` Lorenzo Colitti
2019-06-05 4:05 ` Hangbin Liu
2019-06-05 3:57 ` David Ahern
2019-06-05 4:08 ` Hangbin Liu
2019-06-05 4:58 ` Lorenzo Colitti
2019-06-05 15:33 ` David Ahern
2019-06-06 23:01 ` Maciej Żenczykowski
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=20190508.093541.1274244477886053907.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dsa@cumulusnetworks.com \
--cc=liuhangbin@gmail.com \
--cc=mateusz.bajorski@nokia.com \
--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).