Subject: Re: gre: minor cleanups in netlink interface

From: Patrick McHardy <[email-masked]>
Date: Sat, 11 Oct 2008 17:39:36 +0200

Herbert Xu wrote:
> On Sat, Oct 11, 2008 at 04:45:48PM +0200, Patrick McHardy wrote:
>> Its actually also what defines the difference between using
>> NLM_F_REPLACE (ip link replace) and no flags (ip link change).
>> The former replaces the replaces the object, the later changes
>> an existing object.
> 
> That wasn't the case historically.  For routing NLM_F_REPLACE
> had a real meaning because you can have routes that differ only
> by scope.  So if you considered routes that are otherwise the
> same to be duplicate routes, then NLM_F_REPLACE tells you whether
> you're allowed to create a new route or you must modify one
> of the existing ones.  Of course completely duplicate routes
> where everything is equal is not allowed.

Interesting, I wasn't aware of that.

> Of course NLM_F_REPLACE has since been seconded for other purposes
> so I suppose it can mean whatever you want for rtnl link :)

It actually not supported currently because replacement of links
(while keeping routes etc.) would be highly complicated.