diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:23 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:23 +0200 |
commit | 6a646146718767de5947bc6845c7de717093cca7 (patch) | |
tree | d777a8358bbc15c1f8da5765ece5b8ebacb0a092 /bgpd | |
parent | set community delete stops as soon as it hits a community-list entry with a deny (diff) | |
download | frr-6a646146718767de5947bc6845c7de717093cca7.tar.xz frr-6a646146718767de5947bc6845c7de717093cca7.zip |
"clear ip bgp * soft out" does not trigger resending "neighbor x.x.x.x default-originate"
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgpd.c | 12 |
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) { |