Skip to content

Commit

Permalink
Ignore IPv6 routing cache on linux
Browse files Browse the repository at this point in the history
Recent linux kernels (roughly 3.x) keep a routing cache for IPv6: each
time a host is contacted, a temporary /128 route is added. These
routes are visible using “ip -6 route show cache”.

Asking babeld to redistribute all IPv6 routes known to the host, using
"redistribute ip ::/0", causes it to announce and de-announce these
/128 routes frequently, leading other nodes to mark them as
unreachable (thus preventing communication with the host described by
the /128 route, even though less specific routes are available).
  • Loading branch information
Baptiste Jonglez authored and jech committed May 2, 2013
1 parent 2b19e26 commit 73d8f66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel_netlink.c
Expand Up @@ -1106,6 +1106,10 @@ filter_kernel_routes(struct nlmsghdr *nh, void *data)
if(rtm->rtm_src_len != 0)
return 0;

/* Ignore cached routes, advertised by some kernels (linux 3.x). */
if(rtm->rtm_flags & RTM_F_CLONED)
return 0;

if(data)
current_route = &routes[*found];
else
Expand Down

0 comments on commit 73d8f66

Please sign in to comment.