netdev
[Top] [All Lists]

IPv6: the same address can be added multiple times

To: <netdev@xxxxxxxxxxx>
Subject: IPv6: the same address can be added multiple times
From: Pekka Savola <pekkas@xxxxxxxxxx>
Date: Thu, 3 May 2001 12:04:10 +0300 (EEST)
Cc: <usagi-users@xxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Hi,

It appears you can add _exactly_ same IPv6 address on an interface many
times:

[root@haukka psavola]# /sbin/ifconfig eth0 add 1::1/128
[root@haukka psavola]# /sbin/ifconfig eth0 add 1::1/128
[root@haukka psavola]# /sbin/ifconfig eth0 | grep 1::1
          inet6 addr: 1::1/128 Scope:Global
          inet6 addr: 1::1/128 Scope:Global

[root@haukka psavola]# /sbin/ip addr ls |grep 1::1
    inet6 1::1/128 scope global
    inet6 1::1/128 scope global

They must be removed N times too.

The adding is possible with /sbin/ip.

This also happens with USAGI kernel.

FWIW, KAME stack adds the address only once(, but BSD ifconfig(8)
doesn't show errors when you try to do it again; just doesn't add the
second one).

It looks like a check or two in kernel is missing, or is there some
reasoning to this behaviour?

-- 
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



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