diff options
Diffstat (limited to 'bgpd/bgpd.c')
-rw-r--r-- | bgpd/bgpd.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 060f850b..442ef607 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -293,7 +293,7 @@ bgp_confederation_id_set (struct bgp *bgp, as_t as) { peer->local_as = as; peer->last_reset = PEER_DOWN_CONFED_ID_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } } @@ -307,7 +307,7 @@ bgp_confederation_id_set (struct bgp *bgp, as_t as) if (peer_sort (peer) == BGP_PEER_EBGP) peer->local_as = as; peer->last_reset = PEER_DOWN_CONFED_ID_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } } @@ -331,7 +331,7 @@ bgp_confederation_id_unset (struct bgp *bgp) { peer->local_as = bgp->as; peer->last_reset = PEER_DOWN_CONFED_ID_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } } @@ -389,7 +389,7 @@ bgp_confederation_peers_add (struct bgp *bgp, as_t as) { peer->local_as = bgp->as; peer->last_reset = PEER_DOWN_CONFED_PEER_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } } @@ -440,7 +440,7 @@ bgp_confederation_peers_remove (struct bgp *bgp, as_t as) { peer->local_as = bgp->confed_id; peer->last_reset = PEER_DOWN_CONFED_PEER_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } } @@ -724,7 +724,7 @@ peer_as_change (struct peer *peer, as_t as) if (! CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP)) { peer->last_reset = PEER_DOWN_REMOTE_AS_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } type = peer_sort (peer); @@ -883,7 +883,7 @@ peer_activate (struct peer *peer, afi_t afi, safi_t safi) #endif { peer->last_reset = PEER_DOWN_AF_ACTIVATE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } #if 0 @@ -1518,7 +1518,7 @@ peer_group_bind (struct bgp *bgp, union sockunion *su, peer_group2peer_config_copy (group, peer, afi, safi); peer->last_reset = PEER_DOWN_RMAP_BIND; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); return 0; @@ -1556,7 +1556,7 @@ peer_group_unbind (struct bgp *bgp, struct peer *peer, } peer->last_reset = PEER_DOWN_RMAP_UNBIND; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); return 0; } @@ -2048,7 +2048,7 @@ peer_flag_modify_action (struct peer *peer, u_int32_t flag) else if (flag == PEER_FLAG_DISABLE_CONNECTED_CHECK) peer->last_reset = PEER_DOWN_MULTIHOP_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } } @@ -2418,7 +2418,7 @@ peer_update_source_if_set (struct peer *peer, const char *ifname) if (! CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP)) { peer->last_reset = PEER_DOWN_UPDATE_SOURCE_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); return 0; } @@ -2445,7 +2445,7 @@ peer_update_source_if_set (struct peer *peer, const char *ifname) peer->update_if = XSTRDUP (MTYPE_PEER_UPDATE_SOURCE, ifname); peer->last_reset = PEER_DOWN_UPDATE_SOURCE_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } return 0; @@ -2477,7 +2477,7 @@ peer_update_source_addr_set (struct peer *peer, union sockunion *su) if (! CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP)) { peer->last_reset = PEER_DOWN_UPDATE_SOURCE_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); return 0; } @@ -2503,7 +2503,7 @@ peer_update_source_addr_set (struct peer *peer, union sockunion *su) peer->update_source = sockunion_dup (su); peer->last_reset = PEER_DOWN_UPDATE_SOURCE_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } return 0; @@ -2549,7 +2549,7 @@ peer_update_source_unset (struct peer *peer) if (! CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP)) { peer->last_reset = PEER_DOWN_UPDATE_SOURCE_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); return 0; } @@ -2574,7 +2574,7 @@ peer_update_source_unset (struct peer *peer) } peer->last_reset = PEER_DOWN_UPDATE_SOURCE_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } return 0; @@ -2998,7 +2998,7 @@ peer_local_as_set (struct peer *peer, as_t as, int no_prepend) if (! CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP)) { peer->last_reset = PEER_DOWN_LOCAL_AS_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); return 0; } @@ -3013,7 +3013,7 @@ peer_local_as_set (struct peer *peer, as_t as, int no_prepend) UNSET_FLAG (peer->flags, PEER_FLAG_LOCAL_AS_NO_PREPEND); peer->last_reset = PEER_DOWN_LOCAL_AS_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } @@ -3038,7 +3038,7 @@ peer_local_as_unset (struct peer *peer) if (! CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP)) { peer->last_reset = PEER_DOWN_LOCAL_AS_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); return 0; } @@ -3050,7 +3050,7 @@ peer_local_as_unset (struct peer *peer) UNSET_FLAG (peer->flags, PEER_FLAG_LOCAL_AS_NO_PREPEND); peer->last_reset = PEER_DOWN_LOCAL_AS_CHANGE; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } return 0; @@ -3078,7 +3078,7 @@ peer_password_set (struct peer *peer, const char *password) if (! CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP)) { - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); return BGP_SUCCESS; } @@ -3093,7 +3093,7 @@ peer_password_set (struct peer *peer, const char *password) peer->password = XSTRDUP(MTYPE_PEER_PASSWORD, password); - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); } @@ -3116,7 +3116,7 @@ peer_password_unset (struct peer *peer) && strcmp (peer->group->conf->password, peer->password) == 0) return BGP_ERR_PEER_GROUP_HAS_THE_FLAG; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); if (peer->password) @@ -3134,7 +3134,7 @@ peer_password_unset (struct peer *peer) if (!peer->password) continue; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE, 0)); XFREE (MTYPE_PEER_PASSWORD, peer->password); @@ -3864,12 +3864,12 @@ peer_clear (struct peer *peer) zlog_debug ("%s Maximum-prefix restart timer cancelled", peer->host); } - BGP_EVENT_ADD (peer, BGP_Start); + bgp_peer_enable(peer); return 0; } peer->v_start = BGP_INIT_START_TIMER; - bgp_peer_config_change(peer, bgp_notify_new(BGP_NOTIFY_CEASE, + bgp_peer_reenable(peer, bgp_notify_new(BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_ADMIN_RESET, 0)); } return 0; |