Commit cd0b37cc authored by Baptiste Jonglez's avatar Baptiste Jonglez Committed by Juliusz Chroboczek

Ignore IPv6 routing cache on linux

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).
parent 90b39e7d
...@@ -1089,6 +1089,10 @@ filter_kernel_routes(struct nlmsghdr *nh, void *data) ...@@ -1089,6 +1089,10 @@ filter_kernel_routes(struct nlmsghdr *nh, void *data)
if(rtm->rtm_src_len != 0) if(rtm->rtm_src_len != 0)
return 0; return 0;
/* Ignore cached routes, advertised by some kernels (linux 3.x). */
if(rtm->rtm_flags & RTM_F_CLONED)
return 0;
if(data) if(data)
current_route = &routes[*found]; current_route = &routes[*found];
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment