diff options
author | Martin Mares <mj@ucw.cz> | 2000-05-02 17:21:51 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-05-02 17:21:51 +0200 |
commit | 85a291ff3055f0b10ffc199138c67305f5b3fc98 (patch) | |
tree | 0b15577d579eb044124afb6f2514c57981df264f /nest/rt-table.c | |
parent | d1a74339d4edb717fbe98d412bd5e4ad03bb20a2 (diff) | |
download | bird-85a291ff3055f0b10ffc199138c67305f5b3fc98.tar bird-85a291ff3055f0b10ffc199138c67305f5b3fc98.zip |
IPv6 address classification fixes.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index ae27ceb..0c4c9e7 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -232,10 +232,18 @@ rte_validate(rte *e) c = ipa_classify(n->n.prefix); if (c < 0 || !(c & IADDR_HOST)) { - if (!ipa_nonzero(n->n.prefix) && n->n.pxlen <= 1) - return 1; /* Default route and half-default route is OK */ - log(L_WARN "Ignoring bogus route %I/%d received from %I via %s", - n->n.prefix, n->n.pxlen, e->attrs->from, e->attrs->proto->name); + if (!ipa_nonzero(n->n.prefix)) + { + /* Various default routes */ +#ifdef IPV6 + if (n->n.pxlen == 96) +#else + if (n->n.pxlen <= 1) +#endif + return 1; + } + log(L_WARN "Ignoring bogus route %I/%d received via %s", + n->n.prefix, n->n.pxlen, e->attrs->proto->name); return 0; } if ((c & IADDR_SCOPE_MASK) < e->attrs->proto->min_scope) |