Thread (4 messages) flat view 4 messages, 2 authors, 2012-10-03

Re: [RFC PATCH] ipv6: don't add link local route when there is no link local address

From: David Miller <davem@davemloft.net>
Date: 2012-10-01 20:55:29

From: Nicolas Dichtel <redacted>
Date: Wed, 26 Sep 2012 15:09:22 +0200
When an address is added on loopback (ip -6 a a 2002::1/128 dev lo), a route
to fe80::/64 is added in the main table:
  unreachable fe80::/64 dev lo  proto kernel  metric 256  error -101

This route does not match any prefix (no fe80:: address on lo). In fact,
addrconf_dev_config() will not add link local address because this function
filters interfaces by type. If the link local address is added manually, the
route to the link local prefix will be automatically added by
addrconf_add_linklocal().
Note also, that this route is not deleted when the address is removed.

After looking at the code, it seems that addrconf_add_lroute() is redundant with
addrconf_add_linklocal(), because this function will add the link local route
when the link local address is configured.

Signed-off-by: Nicolas Dichtel <redacted>
This change looks correct, however:
quoted hunk ↗ jump to hunk
@@ -2489,7 +2479,6 @@ static void addrconf_sit_config(struct net_device *dev)
 
 	if (dev->flags&IFF_POINTOPOINT) {
 		addrconf_add_mroute(dev);
-		addrconf_add_lroute(dev);
 	} else
 		sit_route_add(dev);
now that the if() branch is a single statement, please remove the
curly braces.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help