From a7df4ccf0ed9cc594b992dd34b5a740f44e9000f Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Wed, 10 Jul 2019 20:11:47 +0000 Subject: [PATCH] lib: Hash nexthops on onlink flag We should hash nexthops on the onlink flag since that is a descriptor of the nexthop and not a status of it. Signed-off-by: Stephen Worley --- lib/nexthop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/nexthop.c b/lib/nexthop.c index cf5bed3d62..e68e605a6f 100644 --- a/lib/nexthop.c +++ b/lib/nexthop.c @@ -421,6 +421,9 @@ uint32_t nexthop_hash(const struct nexthop *nexthop) case NEXTHOP_TYPE_IPV6: break; } + + key = jhash_1word(CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ONLINK), key); + return key; }