From: Patrick McHardy <kaber@trash.net>
To: "Milan Kocián" <milon@wq.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
netdev@vger.kernel.org,
"bugme-daemon@kernel-bugs.osdl.org"
<bugme-daemon@bugzilla.kernel.org>
Subject: Re: [Bugme-new] [Bug 8320] New: replacing route in kernel doesn't send netlink message
Date: Mon, 16 Apr 2007 06:59:06 +0200 [thread overview]
Message-ID: <4623029A.2090906@trash.net> (raw)
In-Reply-To: <1176400428.24446.40.camel@nt.wq.cz>
Milan Kocián wrote:
> On Wed, 2007-04-11 at 20:19 +0200, Patrick McHardy wrote:
>
>
>>I think having notifications for this case makes sense (IIRC I used
>>to use a similar patch some time ago, but can't find it right now).
>>But we need to indicate somehow that it is a replacement and not a
>>completely new route, either by sending a RTM_DELROUTE for the old
>>route first (which would match what devinet does for addresses)
>>or by echoing the NLM_F_REPLACE flag. The former would probably be
>>easier for userspace to understand since it wouldn't need to
>>replicate the replacement logic just to find out which rule got
>>replaced.
>>
>>
>
>
> Hard to tell what is better. I slightly tried to test my patch with
> quagga routing daemon. And then I tested second case: send RTM_DELROUTE
> before RTM_NEWROUTE. Quagga updates internal rib in both cases (as I saw
> in debug logs). I was in fear that quagga will try to install sefl route
> but it doesn't catch.
> So from my point of view is all the same :).
Looking at some old code of mine, it would treat a simple RTM_NEWROUTE
without deletion in advance incorrectly, but it also would ignore
NLM_F_REPLACE. Quagga doing the right thing seems to be a result of
the fact that it doesn't care about some of the routes attributes and
treats NEWROUTE messages as replacements as long as the attributes it
cares about match.
RTM_DELROUTE + RTM_NEWROUTE seem to be safer, although you're correct
that it might cause userspace to perform some action upon receiving
the DELROUTE message since the update is non-atomic. So I really don't
know, I'm in favour of having notifications for replacements, but I
fear we might break something.
next prev parent reply other threads:[~2007-04-16 5:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200704110937.l3B9b1Kp001053@fire-2.osdl.org>
2007-04-11 16:47 ` [Bugme-new] [Bug 8320] New: replacing route in kernel doesn't send netlink message Andrew Morton
2007-04-11 18:19 ` Patrick McHardy
2007-04-12 17:53 ` Milan Kocián
2007-04-16 4:59 ` Patrick McHardy [this message]
2007-04-17 0:10 ` David Miller
2007-04-17 12:58 ` Patrick McHardy
2007-04-18 12:48 ` Milan Kocián
2007-04-18 14:06 ` Patrick McHardy
2007-04-19 11:30 ` Milan Kocián
2007-04-19 12:12 ` Patrick McHardy
2007-04-19 21:42 ` Andrew Morton
2007-04-20 14:07 ` [patch 1/1] networking: fix sending netlink message when replace route Milan Kocian
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=4623029A.2090906@trash.net \
--to=kaber@trash.net \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=milon@wq.cz \
--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).