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 <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2019-09-24 08:20:34 -04:00
parent e030e863b6
commit 4550d5df00

View File

@ -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) {