Skip to content

Commit

Permalink
Merge pull request #16333 from opensourcerouting/fix/nits
Browse files Browse the repository at this point in the history
bgpd: Drop memset() before encoding EVPN extended communities
  • Loading branch information
donaldsharp authored Jul 3, 2024
2 parents 59e8f19 + c942617 commit d4758b3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions bgpd/bgp_evpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,6 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr,
/* Add MAC mobility (sticky) if needed. */
if (attr->sticky) {
seqnum = 0;
memset(&ecom_sticky, 0, sizeof(ecom_sticky));
encode_mac_mobility_extcomm(1, seqnum, &eval_sticky);
ecom_sticky.size = 1;
ecom_sticky.unit_size = ECOMMUNITY_SIZE;
Expand All @@ -1180,7 +1179,6 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr,

/* Add default gateway, if needed. */
if (attr->default_gw) {
memset(&ecom_default_gw, 0, sizeof(ecom_default_gw));
encode_default_gw_extcomm(&eval_default_gw);
ecom_default_gw.size = 1;
ecom_default_gw.unit_size = ECOMMUNITY_SIZE;
Expand All @@ -1192,7 +1190,6 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr,

proxy = !!(attr->es_flags & ATTR_ES_PROXY_ADVERT);
if (attr->router_flag || proxy) {
memset(&ecom_na, 0, sizeof(ecom_na));
encode_na_flag_extcomm(&eval_na, attr->router_flag, proxy);
ecom_na.size = 1;
ecom_na.unit_size = ECOMMUNITY_SIZE;
Expand Down

0 comments on commit d4758b3

Please sign in to comment.