summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-08-30 17:17:27 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-09-14 11:53:54 +0200
commit84cac51a51fc29349077e8cecadf1aed11f9b824 (patch)
tree68186ea208019211d06ad98df82df84ab255f5e6 /nest/rt-table.c
parenta1839f3c61af66814a8c52b9ad28e59aab4ede0e (diff)
Nest: Keep multipath next hops sorted
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 9baf2849..f4df22aa 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -804,6 +804,13 @@ rte_validate(rte *e)
return 0;
}
+ if ((e->attrs->dest == RTD_MULTIPATH) && !mpnh_is_sorted(e->attrs->nexthops))
+ {
+ log(L_WARN "Ignoring unsorted multipath route %I/%d received via %s",
+ n->n.prefix, n->n.pxlen, e->sender->proto->name);
+ return 0;
+ }
+
return 1;
}