commit d6a7d61751aa1c54158706ce5ec17ca4987beaae Author: Ryota Ozaki Date: Mon Dec 12 09:17:46 2016 +0900 Fix routed; prevent it from removing local routes diff --git a/sbin/routed/table.c b/sbin/routed/table.c index d05f213..24d4e83 100644 --- a/sbin/routed/table.c +++ b/sbin/routed/table.c @@ -1106,6 +1106,10 @@ flush_kern(void) || INFO_DST(&info)->sa_family != AF_INET) continue; + /* Ignore local routes */ + if (rtm->rtm_flags & RTF_LOCAL) + continue; + /* ignore cloned routes */ #if defined(RTF_CLONED) && defined(__bsdi__) @@ -1116,7 +1120,6 @@ flush_kern(void) if (rtm->rtm_flags & RTF_WASCLONED) continue; #endif - /* ignore multicast addresses */ @@ -1267,6 +1270,11 @@ read_rt(void) continue; } + if (m.r.rtm.rtm_flags & RTF_LOCAL) { + trace_act("ignore local routes %s", str); + continue; + } + #if defined(RTF_CLONED) && defined(__bsdi__) if (m.r.rtm.rtm_flags & RTF_CLONED) { trace_act("ignore cloned %s", str);