Skip to content

Commit

Permalink
Merge pull request #10535 from FRRouting/mergify/bp/stable/8.1/pr-10531
Browse files Browse the repository at this point in the history
bgpd: avoid memcmp comparison of struct nexthop (backport #10531)
  • Loading branch information
Jafaral committed Feb 9, 2022
2 parents e68eb83 + c2aed93 commit ea4de81
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bgpd/bgp_pbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1314,10 +1314,7 @@ bool bgp_pbr_action_hash_equal(const void *arg1, const void *arg2)
if (r1->afi != r2->afi)
return false;

if (memcmp(&r1->nh, &r2->nh, sizeof(struct nexthop)))
return false;

return true;
return nexthop_same(&r1->nh, &r2->nh);
}

struct bgp_pbr_rule *bgp_pbr_rule_lookup(vrf_id_t vrf_id,
Expand Down

0 comments on commit ea4de81

Please sign in to comment.