]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #10849 from anlancs/bgpd-cleanup-2
authorRuss White <russ@riw.us>
Tue, 5 Apr 2022 15:40:12 +0000 (11:40 -0400)
committerGitHub <noreply@github.com>
Tue, 5 Apr 2022 15:40:12 +0000 (11:40 -0400)
bgpd: remove unnecessary checkings for bgp_evpn_es_new()

1  2 
bgpd/bgp_evpn_mh.c

index d73186979d27940cc79c0df555a9b2b362cfcf46,f4a061b705b3fb36a290dad3c47b43cdce65c506..858fee50b3992ae7e5ae9b514dbb58d5c5dd2229
@@@ -3821,19 -3815,17 +3810,12 @@@ int bgp_evpn_remote_es_evi_add(struct b
                           &p->prefix.ead_addr.ip.ipaddr_v4);
  
        es = bgp_evpn_es_find(esi);
-       if (!es) {
+       if (!es)
                es = bgp_evpn_es_new(bgp, esi);
-               if (!es) {
-                       flog_err(EC_BGP_ES_CREATE,
-                               "%u: Failed to allocate ES entry for ESI %s - at remote ES Add",
-                               bgp->vrf_id, esi_to_str(esi, buf, sizeof(buf)));
-                       return -1;
-               }
-       }
  
        es_evi = bgp_evpn_es_evi_find(es, vpn);
 -      if (!es_evi) {
 +      if (!es_evi)
                es_evi = bgp_evpn_es_evi_new(es, vpn);
 -              if (!es_evi) {
 -                      bgp_evpn_es_free(es, __func__);
 -                      return -1;
 -              }
 -      }
  
        ead_es = !!p->prefix.ead_addr.eth_tag;
        bgp_evpn_es_evi_vtep_add(bgp, es_evi, p->prefix.ead_addr.ip.ipaddr_v4,