Skip to content

Commit

Permalink
pbrd: We should be looking for v4 and v6 nexthop types
Browse files Browse the repository at this point in the history
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 <sharpd@cumulusnetworks.com>
  • Loading branch information
donaldsharp committed Sep 24, 2019
1 parent e030e86 commit 4550d5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pbrd/pbr_nht.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 4550d5d

Please sign in to comment.