Commit 0845af77 authored by Grégoire Henry's avatar Grégoire Henry Committed by Juliusz Chroboczek

Kernel_socket: do not use the RTF_PROTO2 flag.

parent 655bdffb
...@@ -458,7 +458,7 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen, ...@@ -458,7 +458,7 @@ kernel_route(int operation, const unsigned char *dest, unsigned short plen,
return -1; return -1;
}; };
msg.m_rtm.rtm_index = ifindex; msg.m_rtm.rtm_index = ifindex;
msg.m_rtm.rtm_flags = RTF_UP | RTF_PROTO2; msg.m_rtm.rtm_flags = RTF_UP;
if(plen == 128) msg.m_rtm.rtm_flags |= RTF_HOST; if(plen == 128) msg.m_rtm.rtm_flags |= RTF_HOST;
if(metric == KERNEL_INFINITY) { if(metric == KERNEL_INFINITY) {
msg.m_rtm.rtm_flags |= RTF_BLACKHOLE; msg.m_rtm.rtm_flags |= RTF_BLACKHOLE;
...@@ -596,10 +596,6 @@ parse_kernel_route(const struct rt_msghdr *rtm, struct kernel_route *route) ...@@ -596,10 +596,6 @@ parse_kernel_route(const struct rt_msghdr *rtm, struct kernel_route *route)
/* Filter out multicast route on others BSD */ /* Filter out multicast route on others BSD */
excluded_flags |= RTF_MULTICAST; excluded_flags |= RTF_MULTICAST;
#endif #endif
/* Filter out our own route */
excluded_flags |= RTF_PROTO2;
if((rtm->rtm_flags & excluded_flags) != 0)
return -1;
/* Prefix */ /* Prefix */
if(!(rtm->rtm_addrs & RTA_DST)) if(!(rtm->rtm_addrs & RTA_DST))
......
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