https://github.com/torvalds/linux
Revision 1d1428045c54ef3d172d480806e2066dde0b4b76 authored by Kristian Slavov on 22 December 2005, 02:47:24 UTC, committed by David S. Miller on 22 December 2005, 02:47:24 UTC
If you add more than one IPv6 address belonging to the same prefix and 
delete the address that was last added, routing table entry for that 
prefix is also deleted.
Tested on 2.6.14.4

To reproduce:
ip addr add 3ffe::1/64 dev eth0
ip addr add 3ffe::2/64 dev eth0
/* wait DAD */
sleep 1
ip addr del 3ffe::2/64 dev eth0
ip -6 route

(route to 3ffe::/64 should be gone)

In ipv6_del_addr(), if ifa == ifp, we set ifa->if_next to NULL, and later 
assign ifap = &ifa->if_next, effectively terminating the for-loop.
This prevents us from checking if there are other addresses using the same 
prefix that are valid, and thus resulting in deletion of the prefix.
This applies only if the first entry in idev->addr_list is the address to 
be deleted.

Signed-off-by: Kristian Slavov <kristian.slavov@nomadiclab.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7eb1b3d
History
Tip revision: 1d1428045c54ef3d172d480806e2066dde0b4b76 authored by Kristian Slavov on 22 December 2005, 02:47:24 UTC
[IPV6]: Fix address deletion
Tip revision: 1d14280
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 391 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 87.5 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 63.8 KB
Makefile -rw-r--r-- 42.8 KB
README -rw-r--r-- 14.7 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top