diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-09-24 19:08:14 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-09-24 19:08:14 +0200 |
commit | 2d507e64b7d7029906aac30dbea317795b5339de (patch) | |
tree | d6c06aa6b73b8a5ba33957009eed6789fc32dc69 /sysdep/linux | |
parent | 54fe0d9230be440d9f627ff7f94a202e6117e1b9 (diff) | |
download | bird-2d507e64b7d7029906aac30dbea317795b5339de.tar bird-2d507e64b7d7029906aac30dbea317795b5339de.zip |
Do not allow gateway routes with NULL iface.
Diffstat (limited to 'sysdep/linux')
-rw-r--r-- | sysdep/linux/krt-scan.c | 6 | ||||
-rw-r--r-- | sysdep/linux/netlink/netlink.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sysdep/linux/krt-scan.c b/sysdep/linux/krt-scan.c index b7fc129..374cf01 100644 --- a/sysdep/linux/krt-scan.c +++ b/sysdep/linux/krt-scan.c @@ -103,8 +103,10 @@ krt_parse_entry(byte *ent, struct krt_proto *p) if (ng && ng->scope) a.iface = ng->iface; else - /* FIXME: Remove this warning? Handle it somehow... */ - log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", gw, net->n.prefix, net->n.pxlen); + { + log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen); + return; + } a.dest = RTD_ROUTER; a.gw = gw; } diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index 2e85f54..9f839af 100644 --- a/sysdep/linux/netlink/netlink.c +++ b/sysdep/linux/netlink/netlink.c @@ -686,8 +686,10 @@ nl_parse_route(struct nlmsghdr *h, int scan) if (ng && ng->scope) ra.iface = ng->iface; else - /* FIXME: Remove this warning? Handle it somehow... */ - log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen); + { + log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen); + return; + } } else { |