Merge pull request #2852 from donaldsharp/bgp_clean

Bgp clean
This commit is contained in:
Russ White 2018-08-16 11:30:03 -04:00 committed by GitHub
commit 91a4566c1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 18 deletions

View File

@ -239,10 +239,10 @@ void bgp_keepalives_on(struct peer *peer)
/* placeholder bucket data to use for fast key lookups */
static struct pkat holder = {0};
if (!peerhash_mtx) {
zlog_warn("%s: call bgp_keepalives_init() first", __func__);
return;
}
/*
* We need to ensure that bgp_keepalives_init was called first
*/
assert(peerhash_mtx);
pthread_mutex_lock(peerhash_mtx);
{
@ -269,10 +269,10 @@ void bgp_keepalives_off(struct peer *peer)
/* placeholder bucket data to use for fast key lookups */
static struct pkat holder = {0};
if (!peerhash_mtx) {
zlog_warn("%s: call bgp_keepalives_init() first", __func__);
return;
}
/*
* We need to ensure that bgp_keepalives_init was called first
*/
assert(peerhash_mtx);
pthread_mutex_lock(peerhash_mtx);
{

View File

@ -494,16 +494,18 @@ static int bgp_info_cmp(struct bgp *bgp, struct bgp_info *new,
}
if (newattr->sticky && !existattr->sticky) {
zlog_warn(
"%s: %s wins over %s due to sticky MAC flag",
pfx_buf, new_buf, exist_buf);
if (debug)
zlog_debug(
"%s: %s wins over %s due to sticky MAC flag",
pfx_buf, new_buf, exist_buf);
return 1;
}
if (!newattr->sticky && existattr->sticky) {
zlog_warn(
"%s: %s loses to %s due to sticky MAC flag",
pfx_buf, new_buf, exist_buf);
if (debug)
zlog_debug(
"%s: %s loses to %s due to sticky MAC flag",
pfx_buf, new_buf, exist_buf);
return 0;
}
}

View File

@ -803,7 +803,7 @@ DEFUN_HIDDEN (no_bgp_multiple_instance,
vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
vty_out(vty, "if you are using this please let the developers know\n");
zlog_warn("Deprecated option: `bgp multiple-instance` being used");
zlog_info("Deprecated option: `bgp multiple-instance` being used");
ret = bgp_option_unset(BGP_OPT_MULTIPLE_INSTANCE);
if (ret < 0) {
vty_out(vty, "%% There are more than two BGP instances\n");
@ -828,7 +828,7 @@ DEFUN_HIDDEN (bgp_config_type,
if (argv_find(argv, argc, "cisco", &idx)) {
vty_out(vty, "This config option is deprecated, and is scheduled for removal.\n");
vty_out(vty, "if you are using this please let the developers know!\n");
zlog_warn("Deprecated option: `bgp config-type cisco` being used");
zlog_info("Deprecated option: `bgp config-type cisco` being used");
bgp_option_set(BGP_OPT_CONFIG_CISCO);
} else
bgp_option_unset(BGP_OPT_CONFIG_CISCO);

View File

@ -1017,7 +1017,7 @@ static int bgp_zebra_tm_connect(struct thread *t)
ret = tm_table_manager_connect(zclient);
}
if (ret < 0) {
zlog_warn("Error connecting to table manager!");
zlog_info("Error connecting to table manager!");
bgp_tm_status_connected = false;
} else {
if (!bgp_tm_status_connected)

View File

@ -4091,7 +4091,7 @@ static int peer_af_flag_modify(struct peer *peer, afi_t afi, safi_t safi,
if (flag & PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS) {
if (!bgp_flag_check(
bgp, BGP_FLAG_DETERMINISTIC_MED)) {
zlog_warn(
zlog_info(
"%s: enabling bgp deterministic-med, this is required"
" for addpath-tx-bestpath-per-AS",
peer->host);