From 4550d5df00c64554fe21d490ec4cd7d0845111c2 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 24 Sep 2019 08:20:34 -0400 Subject: [PATCH] pbrd: We should be looking for v4 and v6 nexthop types The code should be looking for both v4 and v6 nexthop types instead of v4 nexthop types 2 times. Found by Coverity SA Signed-off-by: Donald Sharp --- pbrd/pbr_nht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c index 359f869c42..ae04402f49 100644 --- a/pbrd/pbr_nht.c +++ b/pbrd/pbr_nht.c @@ -711,7 +711,7 @@ pbr_nht_individual_nexthop_gw_update(struct pbr_nexthop_cache *pnhc, } if (pnhc->nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX - || pnhc->nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX) { + || pnhc->nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX) { /* GATEWAY_IFINDEX type shouldn't resolve to group */ if (pnhi->nhr->nexthop_num > 1) {