summaryrefslogtreecommitdiff
path: root/nest/route.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-02 18:23:06 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-02 18:23:06 +0200
commit59d3a3611f05c05040cec4bf09f31c26ade0fa0a (patch)
treeaab1ddc488455681058e40e277a948462f00ae93 /nest/route.h
parent1187627a1dded6a3673c0d43033f431f15cd1b8f (diff)
Netlink: Handle alien routes with unsorted nexthops
Nest requires that nexthops are sorted, the kernel protocol have to ensure that for alien routes.
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/nest/route.h b/nest/route.h
index 15aac8f6..e356f686 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -628,6 +628,7 @@ int nexthop__same(struct nexthop *x, struct nexthop *y); /* Compare multipath ne
static inline int nexthop_same(struct nexthop *x, struct nexthop *y)
{ return (x == y) || nexthop__same(x, y); }
struct nexthop *nexthop_merge(struct nexthop *x, struct nexthop *y, int rx, int ry, int max, linpool *lp);
+struct nexthop *nexthop_sort(struct nexthop *x);
static inline void nexthop_link(struct rta *a, struct nexthop *from)
{ memcpy(&a->nh, from, nexthop_size(from)); }
void nexthop_insert(struct nexthop **n, struct nexthop *y);