summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_snmp.c
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2017-10-19 20:23:30 +0200
committerDon Slice <dslice@cumulusnetworks.com>2017-10-26 17:55:31 +0200
commitd25e4efc52eb5e4c71f43c02991e3c9bba2388c1 (patch)
tree5858964602ed9e9e2e3c2b888b1f0fc0713caddc /bgpd/bgp_snmp.c
parentMerge pull request #1362 from dslicenc/cm18309-label-delete (diff)
downloadfrr-d25e4efc52eb5e4c71f43c02991e3c9bba2388c1.tar.xz
frr-d25e4efc52eb5e4c71f43c02991e3c9bba2388c1.zip
bgpd: fix various problems with hold/keepalive timers
Problem reported that we weren't adjusting the keepalive timer correctly when we negotiated a lower hold time learned from a peer. While working on this, found we didn't do inheritance correctly at all. This fix solves the first problem and also ensures that the timers are configured correctly based on this priority order - peer defined > peer-group defined > global config. This fix also displays the timers as "configured" regardless of which of the three locations above is used. Ticket: CM-18408 Signed-off-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: CCR-6807 Testing-performed: Manual testing successful, fix tested by submitter, bgp-smoke completed successfully
Diffstat (limited to 'bgpd/bgp_snmp.c')
-rw-r--r--bgpd/bgp_snmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c
index 8a9d61f30..484ea7c43 100644
--- a/bgpd/bgp_snmp.c
+++ b/bgpd/bgp_snmp.c
@@ -615,14 +615,14 @@ static u_char *bgpPeerTable(struct variable *v, oid name[], size_t *length,
break;
case BGPPEERHOLDTIMECONFIGURED:
*write_method = write_bgpPeerTable;
- if (CHECK_FLAG(peer->config, PEER_CONFIG_TIMER))
+ if (PEER_OR_GROUP_TIMER_SET(peer))
return SNMP_INTEGER(peer->holdtime);
else
return SNMP_INTEGER(peer->v_holdtime);
break;
case BGPPEERKEEPALIVECONFIGURED:
*write_method = write_bgpPeerTable;
- if (CHECK_FLAG(peer->config, PEER_CONFIG_TIMER))
+ if (PEER_OR_GROUP_TIMER_SET(peer))
return SNMP_INTEGER(peer->keepalive);
else
return SNMP_INTEGER(peer->v_keepalive);