diff options
Diffstat (limited to 'bgpd/bgpd.c')
-rw-r--r-- | bgpd/bgpd.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 05bc804db..c2254ae79 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -583,9 +583,9 @@ void bgp_timers_set(struct vty *vty, struct bgp *bgp, uint32_t keepalive, /* mostly for completeness - CLI uses its own defaults */ void bgp_timers_unset(struct bgp *bgp) { - bgp->default_keepalive = BGP_DEFAULT_KEEPALIVE; - bgp->default_holdtime = BGP_DEFAULT_HOLDTIME; - bgp->default_connect_retry = BGP_DEFAULT_CONNECT_RETRY; + bgp->default_keepalive = DFLT_BGP_KEEPALIVE; + bgp->default_holdtime = DFLT_BGP_HOLDTIME; + bgp->default_connect_retry = DFLT_BGP_CONNECT_RETRY; bgp->default_delayopen = BGP_DEFAULT_DELAYOPEN; } @@ -2768,14 +2768,14 @@ int peer_delete(struct peer *peer) } /* Local and remote addresses. */ - if (peer->su_local) { - sockunion_free(peer->su_local); - peer->su_local = NULL; + if (peer->connection->su_local) { + sockunion_free(peer->connection->su_local); + peer->connection->su_local = NULL; } - if (peer->su_remote) { - sockunion_free(peer->su_remote); - peer->su_remote = NULL; + if (peer->connection->su_remote) { + sockunion_free(peer->connection->su_remote); + peer->connection->su_remote = NULL; } /* Free filter related memory. */ @@ -4953,6 +4953,10 @@ static void peer_flag_modify_action(struct peer *peer, uint64_t flag) peer->v_start = BGP_INIT_START_TIMER; BGP_EVENT_ADD(peer->connection, BGP_Stop); } + } else if (CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_RCV) && + CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_ADV) && + flag == PEER_FLAG_CAPABILITY_ENHE) { + peer->last_reset = PEER_DOWN_CAPABILITY_CHANGE; } else if (!peer_notify_config_change(peer->connection)) bgp_session_reset(peer); } |