diff options
| author | anlan_cs <vic.lan@pica8.com> | 2022-05-10 21:48:50 -0400 |
|---|---|---|
| committer | anlan_cs <vic.lan@pica8.com> | 2022-05-10 22:21:32 -0400 |
| commit | cabddbf5f65bb833cca72dce25e8684731422476 (patch) | |
| tree | e67cf798de5dd8c7228c44a0533d33023e2925ba | |
| parent | 026f28e8caf9c37c851ad7b649e8439e0baf9588 (diff) | |
bgpd: remove unncessary check for evpn
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>
| -rw-r--r-- | bgpd/bgp_evpn_private.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bgpd/bgp_evpn_private.h b/bgpd/bgp_evpn_private.h index 763408782f..64fdc29704 100644 --- a/bgpd/bgp_evpn_private.h +++ b/bgpd/bgp_evpn_private.h @@ -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 |
