Subject: Re: [Bugme-new] [Bug 8320] New: replacing route in kernel doesn't send netlink message

From: Patrick McHardy <[email-masked]>
Date: Tue, 17 Apr 2007 14:58:21 +0200

David Miller wrote:
> From: Patrick McHardy <[email-masked]>
> Date: Mon, 16 Apr 2007 06:59:06 +0200
> 
> 
>>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.
> 
> 
> We can cry foul about a broken application if an application following
> the API correctly would interpret the new messages correctly.
> 
> I think it doesn't make sense to do a delete then a newroute for
> the atomicity issues, and therefore the replace makes the most
> sense as long as existing correct uses of the API would not
> explode on this.

They shouldn't, worst case is that they ignore NLM_F_REPLACE and treat
it as a completely new route, which is at least half way correct and
not really worse than today.

Milan, could you cook up another patch which uses NLM_F_REPLACE?