]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: remove unncessary check for evpn
authoranlan_cs <vic.lan@pica8.com>
Wed, 11 May 2022 01:48:50 +0000 (21:48 -0400)
committeranlan_cs <vic.lan@pica8.com>
Wed, 11 May 2022 02:21:32 +0000 (22:21 -0400)
In current code, `build_evpn_type2_prefix()` doesn't distinguish ARP
according to the `ip` parameter. The `ip` parameter from caller is
always non-NULL.

Be consistent and not confused, just remove the unnecessary check.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
bgpd/bgp_evpn_private.h

index 763408782f79372aa10d67b0cd88cb0338d96219..64fdc29704d156300c6d3cf2a22e6c44f116a6a5 100644 (file)
@@ -450,8 +450,7 @@ static inline void build_evpn_type2_prefix(struct prefix_evpn *p,
        p->prefix.route_type = BGP_EVPN_MAC_IP_ROUTE;
        memcpy(&p->prefix.macip_addr.mac.octet, mac->octet, ETH_ALEN);
        p->prefix.macip_addr.ip.ipa_type = IPADDR_NONE;
-       if (ip)
-               memcpy(&p->prefix.macip_addr.ip, ip, sizeof(*ip));
+       memcpy(&p->prefix.macip_addr.ip, ip, sizeof(*ip));
 }
 
 static inline void