netdev
[Top] [All Lists]

Re: [PATCH] [NET]: Fix deletion of local addresses only varying in prefi

To: Thomas Graf <tgraf@xxxxxxx>
Subject: Re: [PATCH] [NET]: Fix deletion of local addresses only varying in prefix length
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 5 Mar 2005 07:46:11 +1100
Cc: davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20050304204000.GA14725@xxxxxxxxxxxxxxxxxxx>
References: <20050304012003.GA31837@xxxxxxxxxxxxxx> <E1D78DN-0002te-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20050304131419.GE31837@xxxxxxxxxxxxxx> <20050304204000.GA14725@xxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
On Sat, Mar 05, 2005 at 07:40:00AM +1100, herbert wrote:
> On Fri, Mar 04, 2005 at 02:14:19PM +0100, Thomas Graf wrote:
> > 
> > I do not agree but I might have a better idea. Let's change iproute2
> > to provide a prefixlength of 0 if no prefix was specified and only
> > compare the prefixes if it is non zero. This allows for accurate
> > deletion, no scripts will break (except for really really broken ones).
> > Given there are multiple matching addresses only varying in prefix
> > length and no prefix was specified the first one will get deleted but
> > this is well defined.
> 
> Yep this is a good solution.

There is one hitch though.  iproute2 probably uses the same function to
parse the address used in adding as well as deleting addresses.  So you'll
need to be careful to only do this for the case of deleting.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>