diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-04-09 00:56:47 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-04-09 00:56:47 +0200 |
commit | de14a7c7aa9225cbc9f837fac9e332a99a99ed69 (patch) | |
tree | 266703d928b0e68face70257bdb46ded22e4c52e /sysdep | |
parent | a9f380fe83187a95ead715e516696024e73f3fb7 (diff) | |
download | bird-de14a7c7aa9225cbc9f837fac9e332a99a99ed69.tar bird-de14a7c7aa9225cbc9f837fac9e332a99a99ed69.zip |
Ignore routes with next-hop 127.0.0.1 on BSD.
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 9c8b71f..4817df3 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -381,6 +381,11 @@ krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan) ng = neigh_find2(&p->p, &a.gw, a.iface, 0); if (!ng || (ng->scope == SCOPE_HOST)) { + /* Ignore routes with next-hop 127.0.0.1, host routes with such + next-hop appear on OpenBSD for address aliases. */ + if (ipa_classify(a.gw) == (IADDR_HOST | SCOPE_HOST)) + return; + log(L_ERR "KRT: Received route %I/%d with strange next-hop %I", net->n.prefix, net->n.pxlen, a.gw); return; |