]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_route.c
Merge pull request #4514 from opensourcerouting/warnings-20190612
[mirror_frr.git] / bgpd / bgp_route.c
index dc8f6a735710e4476a476a27b57b46511403ff7a..ae1821c43a324ad1dd8a753017ad40cfad5e76fe 100644 (file)
@@ -5788,6 +5788,13 @@ static void bgp_aggregate_route(struct bgp *bgp, struct prefix *p,
        unsigned long match = 0;
        uint8_t atomic_aggregate = 0;
 
+       /* If the bgp instance is being deleted or self peer is deleted
+        * then do not create aggregate route
+        */
+       if (bgp_flag_check(bgp, BGP_FLAG_DELETE_IN_PROGRESS) ||
+          (bgp->peer_self == NULL))
+               return;
+
        /* ORIGIN attribute: If at least one route among routes that are
           aggregated has ORIGIN with the value INCOMPLETE, then the
           aggregated route must have the ORIGIN attribute with the value