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/