summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
Diffstat (limited to 'nest')
-rw-r--r--nest/iface.c2
-rw-r--r--nest/rt-table.c16
2 files changed, 14 insertions, 4 deletions
diff --git a/nest/iface.c b/nest/iface.c
index b58b183..d41b39d 100644
--- a/nest/iface.c
+++ b/nest/iface.c
@@ -371,8 +371,10 @@ ifa_update(struct ifa *a)
if (!(i->flags & IF_MULTIACCESS) && a->pxlen < BITS_PER_IP_ADDRESS - 2)
log(L_WARN "Strange prefix length %d for point-to-point interface %s", a->pxlen, i->name);
+#ifndef IPV6
if ((i->flags & IF_BROADCAST) && !ipa_nonzero(a->brd))
log(L_ERR "Missing broadcast address for interface %s", i->name);
+#endif
b = mb_alloc(if_pool, sizeof(struct ifa));
memcpy(b, a, sizeof(struct ifa));
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)