]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Ignore routes with next-hop 127.0.0.1 on BSD.
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 8 Apr 2010 22:56:47 +0000 (00:56 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Thu, 8 Apr 2010 22:56:47 +0000 (00:56 +0200)
sysdep/bsd/krt-sock.c

index 9c8b71f78aa3056f5976de71c0b68b2b74663824..4817df393e4db6b463428a6ed1fdc0a06fcbc09e 100644 (file)
@@ -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;