summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-05-20 03:04:23 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-05-20 03:04:23 +0200
commit6a646146718767de5947bc6845c7de717093cca7 (patch)
treed777a8358bbc15c1f8da5765ece5b8ebacb0a092
parentset community delete stops as soon as it hits a community-list entry with a deny (diff)
downloadfrr-6a646146718767de5947bc6845c7de717093cca7.tar.xz
frr-6a646146718767de5947bc6845c7de717093cca7.zip
"clear ip bgp * soft out" does not trigger resending "neighbor x.x.x.x default-originate"
-rw-r--r--bgpd/bgpd.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 61b2fb93c..a5794af78 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -5588,6 +5588,8 @@ int
peer_clear_soft (struct peer *peer, afi_t afi, safi_t safi,
enum bgp_clear_type stype)
{
+ struct peer_af *paf;
+
if (peer->status != Established)
return 0;
@@ -5603,7 +5605,15 @@ peer_clear_soft (struct peer *peer, afi_t afi, safi_t safi,
}
if (stype == BGP_CLEAR_SOFT_OUT || stype == BGP_CLEAR_SOFT_BOTH)
- bgp_announce_route (peer, afi, safi);
+ {
+ /* Clear the "neighbor x.x.x.x default-originate" flag */
+ paf = peer_af_find (peer, afi, safi);
+ if (paf && paf->subgroup &&
+ CHECK_FLAG (paf->subgroup->sflags, SUBGRP_STATUS_DEFAULT_ORIGINATE))
+ UNSET_FLAG (paf->subgroup->sflags, SUBGRP_STATUS_DEFAULT_ORIGINATE);
+
+ bgp_announce_route (peer, afi, safi);
+ }
if (stype == BGP_CLEAR_SOFT_IN_ORF_PREFIX)
{