Commit 3880d2e5 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fix checking for martian routes from kernel.

parent f9a4f459
......@@ -851,7 +851,7 @@ filter_kernel_routes(struct nlmsghdr *nh, void *data)
if(rtm->rtm_scope >= RT_SCOPE_LINK)
return 0;
if(rtm->rtm_dst_len > maxplen || rtm->rtm_src_len != 0)
if(rtm->rtm_src_len != 0)
return 0;
if(data)
......@@ -863,8 +863,10 @@ filter_kernel_routes(struct nlmsghdr *nh, void *data)
if(rc < 0)
return 0;
if(rtm->rtm_dst_len >= 8 &&
(current_route->prefix[0] == 0xFF || current_route->prefix[0] == 0))
if(current_route->plen > maxplen)
return 0;
if(martian_prefix(current_route->prefix, current_route->plen))
return 0;
/* Ignore default unreachable routes; no idea where they come from. */
......
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