summaryrefslogtreecommitdiff
path: root/bgpd/bgp_nexthop.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_nexthop.c')
-rw-r--r--bgpd/bgp_nexthop.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index 0e56d368..d4692366 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -506,6 +506,16 @@ bgp_scan (afi_t afi, safi_t safi)
else if (afi == AFI_IP6)
zlog_debug ("scanning IPv6 Unicast routing tables");
}
+
+ /* Reevaluate default-originate route-maps and announce/withdraw
+ * default route if neccesary. */
+ for (ALL_LIST_ELEMENTS (bgp->peer, node, nnode, peer))
+ {
+ if (peer->status == Established
+ && CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_DEFAULT_ORIGINATE)
+ && peer->default_rmap[afi][safi].name)
+ bgp_default_originate (peer, afi, safi, 0);
+ }
}
/* BGP scan thread. This thread check nexthop reachability. */