lkml.org 
[lkml]   [2001]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: IPv6: the same address can be added multiple times
On Sun, 13 May 2001 kuznet@ms2.inr.ac.ru wrote:
> Hello!
>
> > It appears you can add _exactly_ same IPv6 address on an interface many
> > times:
>
> Yes. BTW, look here:
>
> kuznet@dust:~ # ip -6 a ls sit0
> 7: sit0@NONE: <NOARP,UP> mtu 1480 qdisc noqueue
> inet6 ::127.0.0.1/96 scope host
> inet6 ::193.233.7.100/96 scope global
> inet6 ::193.233.7.100/96 scope global
>
> I have two equal addresses inherited from one IPv4 address
> on two interfaces. Nothing illegal.

Heh, I doubt there's an RFC that says "you MUST not be able to add the
same address twice to an interface". I think it's kind of taken for
granted. ;-)

But it still looks dirty. Also, it's easier to add it many times by
mistake; IPv4 addresses do not allow this. And as you have to remove them
N times too, this may create even more confusion.

> > It looks like a check or two in kernel is missing, or is there some
> > reasoning to this behaviour?
>
> Well, it is one of well defined approaches (unlike KAME's one).
> Alternative is to implement full set of options NLM_F_* like used
> in IPv4 routing to block undefined cases. In IPv6 flags are hardwired
> to NLM_F_CREATE|NLM_F_APPEND both for addresses and routes.

Well, I can't really formulate an expert opinion as I'm not intimate how
this works on Linux, but I think KAME adds addresses to a structure where
duplicates aren't possible.

Also, what would be the other well defined approaches? Quickly I can
think of only two, if "only one same address" isn't possible:
1) never allow any address to be added at all
2) no significant restrictions (==this)

I don't think the former is what people want either ;-)

Please Cc:.
--
Pekka Savola "Tell me of difficulties surmounted,
Netcore Oy not those you stumble over and fall"
Systems. Networks. Security. -- Robert Jordan: A Crown of Swords

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.073 / U:2.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site