On BSD, consider unmarked non-device routes as alien.
This commit is contained in:
parent
6b5a8649a4
commit
a9f380fe83
1 changed files with 9 additions and 1 deletions
|
@ -296,7 +296,7 @@ krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan)
|
||||||
{ log(L_ERR "%s (%I/%d) - missing gateway", errmsg, idst, pxlen); return; }
|
{ log(L_ERR "%s (%I/%d) - missing gateway", errmsg, idst, pxlen); return; }
|
||||||
|
|
||||||
u32 self_mask = RTF_PROTO1;
|
u32 self_mask = RTF_PROTO1;
|
||||||
u32 alien_mask = RTF_STATIC | RTF_PROTO1;
|
u32 alien_mask = RTF_STATIC | RTF_PROTO1 | RTF_GATEWAY;
|
||||||
|
|
||||||
#ifdef RTF_PROTO2
|
#ifdef RTF_PROTO2
|
||||||
alien_mask |= RTF_PROTO2;
|
alien_mask |= RTF_PROTO2;
|
||||||
|
@ -306,6 +306,14 @@ krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan)
|
||||||
alien_mask |= RTF_PROTO3;
|
alien_mask |= RTF_PROTO3;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RTF_REJECT
|
||||||
|
alien_mask |= RTF_REJECT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RTF_BLACKHOLE
|
||||||
|
alien_mask |= RTF_BLACKHOLE;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (flags & (RTF_DYNAMIC | RTF_MODIFIED))
|
if (flags & (RTF_DYNAMIC | RTF_MODIFIED))
|
||||||
src = KRT_SRC_REDIRECT;
|
src = KRT_SRC_REDIRECT;
|
||||||
else if (flags & self_mask)
|
else if (flags & self_mask)
|
||||||
|
|
Loading…
Reference in a new issue