Skip to content

Commit

Permalink
Provide logging for the AS updates in config (R5.0)
Browse files Browse the repository at this point in the history
Added BGP logging support for changes in AS.
Closes-Bug: 1781531

Change-Id: I81bccf678913a2525d9a4d933e8577aad354bca8
(cherry picked from commit 7669f8a)
  • Loading branch information
nkarjala committed Aug 8, 2018
1 parent 9d61f18 commit 2b6c717
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/bgp/bgp_peer.cc
Expand Up @@ -931,18 +931,36 @@ void BgpPeer::ConfigUpdate(const BgpNeighborConfig *config) {
ProcessEndpointConfig(config);

if (local_as_ != config->local_as()) {
BGP_LOG_STR(BgpConfig, SandeshLevel::SYS_DEBUG,
BGP_LOG_FLAG_SYSLOG,
"Updated Local Autonomous System from " <<
local_as_ << " to " <<
config->local_as());

local_as_ = config->local_as();
peer_info.set_local_asn(local_as_);
clear_session = true;
}

if (hold_time_ != config->hold_time()) {
BGP_LOG_STR(BgpConfig, SandeshLevel::SYS_DEBUG,
BGP_LOG_FLAG_SYSLOG,
"Updated Hold Time from " <<
hold_time_ << " to " <<
config->hold_time());

hold_time_ = config->hold_time();
peer_info.set_hold_time(hold_time_);
clear_session = true;
}

if (peer_as_ != config->peer_as()) {
BGP_LOG_STR(BgpConfig, SandeshLevel::SYS_DEBUG,
BGP_LOG_FLAG_SYSLOG,
"Updated Peer Autonomous System from " <<
peer_as_ << " to " <<
config->peer_as());

peer_as_ = config->peer_as();
peer_info.set_peer_asn(peer_as_);
clear_session = true;
Expand Down

0 comments on commit 2b6c717

Please sign in to comment.