]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
addrconf: refuse isatap eui64 for INADDR_ANY
authorSascha Hlusiak <contact@saschahlusiak.de>
Tue, 19 May 2009 12:56:51 +0000 (12:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 May 2009 23:02:02 +0000 (16:02 -0700)
A tunnel with no local ipv4 endpoint would otherwise use the
ISATAP linklocal address fe80::5efe:0:0, which is invalid. Rather not
add a linklocal address at all.

Signed-off-by: Sascha Hlusiak <contact@saschahlusiak.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c

index 9eb61c7cae5783574efbf4d3d293221b26d9c9ac..31938e5fb2206be53a0945cc39b2737d2018b214 100644 (file)
@@ -1520,6 +1520,8 @@ static int addrconf_ifid_infiniband(u8 *eui, struct net_device *dev)
 
 int __ipv6_isatap_ifid(u8 *eui, __be32 addr)
 {
+       if (addr == 0)
+               return -1;
        eui[0] = (ipv4_is_zeronet(addr) || ipv4_is_private_10(addr) ||
                  ipv4_is_loopback(addr) || ipv4_is_linklocal_169(addr) ||
                  ipv4_is_private_172(addr) || ipv4_is_test_192(addr) ||