diff options
| author | Iqra Siddiqui <imujeebsiddi@vmware.com> | 2022-01-18 00:36:13 -0800 |
|---|---|---|
| committer | Iqra Siddiqui <imujeebsiddi@vmware.com> | 2022-01-31 21:50:50 -0800 |
| commit | 761cc919fae515e8f8046e5e31558f6208f65a21 (patch) | |
| tree | c20fe532ef528cf8cd819551da88cbf2bdaac93c /bgpd/bgp_attr_evpn.c | |
| parent | ff8b960c1c75da154b1b77e639926294a2d45ff9 (diff) | |
bgpd: Fixing memcmp to avoid coverity issue
Description:
Replacing memcmp at certain places,
to avoid the coverity issues caused by it.
Co-authored-by: Kantesh Mundargi <kmundaragi@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
Diffstat (limited to 'bgpd/bgp_attr_evpn.c')
| -rw-r--r-- | bgpd/bgp_attr_evpn.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bgpd/bgp_attr_evpn.c b/bgpd/bgp_attr_evpn.c index add999bd44..cbb071738d 100644 --- a/bgpd/bgp_attr_evpn.c +++ b/bgpd/bgp_attr_evpn.c @@ -36,6 +36,14 @@ #include "bgpd/bgp_evpn.h" #include "bgpd/bgp_evpn_private.h" +bool bgp_route_evpn_same(const struct bgp_route_evpn *e1, + const struct bgp_route_evpn *e2) +{ + return (e1->type == e2->type && + !memcmp(&(e1->eth_s_id), &(e2->eth_s_id), sizeof(esi_t)) && + !ipaddr_cmp(&(e1->gw_ip), &(e2->gw_ip))); +} + void bgp_add_routermac_ecom(struct attr *attr, struct ethaddr *routermac) { struct ecommunity_val routermac_ecom; |
