summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_snmp_bgp4v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_snmp_bgp4v2.c b/bgpd/bgp_snmp_bgp4v2.c
index f0222846c0..bfad01f66e 100644
--- a/bgpd/bgp_snmp_bgp4v2.c
+++ b/bgpd/bgp_snmp_bgp4v2.c
@@ -339,7 +339,8 @@ static uint8_t *bgpv2PeerErrorsTable(struct variable *v, oid name[],
}
return SNMP_STRING("");
case BGP4V2_PEER_LAST_ERROR_RECEIVED_DATA:
- if (peer->last_reset == PEER_DOWN_NOTIFY_RECEIVED)
+ if (peer->last_reset == PEER_DOWN_NOTIFY_RECEIVED &&
+ peer->notify.data)
return SNMP_STRING(peer->notify.data);
else
return SNMP_STRING("");