summaryrefslogtreecommitdiff
path: root/sysdep/bsd/krt-sock.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-04-08 18:41:17 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-04-08 18:41:17 +0200
commita9f380fe83187a95ead715e516696024e73f3fb7 (patch)
tree44e75a620ea17fc05254e5bf3d71ce38b7a8f9e1 /sysdep/bsd/krt-sock.c
parent6b5a8649a48d7616efbc798095eee2c10563b4e6 (diff)
On BSD, consider unmarked non-device routes as alien.
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r--sysdep/bsd/krt-sock.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index d991ea13..9c8b71f7 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -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; }
u32 self_mask = RTF_PROTO1;
- u32 alien_mask = RTF_STATIC | RTF_PROTO1;
+ u32 alien_mask = RTF_STATIC | RTF_PROTO1 | RTF_GATEWAY;
#ifdef 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;
#endif
+#ifdef RTF_REJECT
+ alien_mask |= RTF_REJECT;
+#endif
+
+#ifdef RTF_BLACKHOLE
+ alien_mask |= RTF_BLACKHOLE;
+#endif
+
if (flags & (RTF_DYNAMIC | RTF_MODIFIED))
src = KRT_SRC_REDIRECT;
else if (flags & self_mask)