diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index 76f8b8712b..00d225bf65 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -850,8 +850,9 @@ static uint8_t *bgp4PathAttrTable(struct variable *v, oid name[], } /* BGP Traps. */ -static struct trap_object bgpTrapList[] = {{3, {3, 1, BGPPEERLASTERROR}}, - {3, {3, 1, BGPPEERSTATE}}}; +static struct trap_object bgpTrapList[] = {{3, {3, 1, BGPPEERREMOTEADDR} }, + {3, {3, 1, BGPPEERLASTERROR} }, + {3, {3, 1, BGPPEERSTATE} } }; static int bgpTrapEstablished(struct peer *peer) { @@ -869,10 +870,10 @@ static int bgpTrapEstablished(struct peer *peer) oid_copy_addr(index, &addr, IN_ADDR_SIZE); - smux_trap(bgp_variables, array_size(bgp_variables), bgp_trap_oid, - array_size(bgp_trap_oid), bgp_oid, - sizeof(bgp_oid) / sizeof(oid), index, IN_ADDR_SIZE, - bgpTrapList, array_size(bgpTrapList), BGPESTABLISHED); + ret = smux_trap(bgp_variables, array_size(bgp_variables), bgp_trap_oid, + array_size(bgp_trap_oid), bgp_oid, + sizeof(bgp_oid) / sizeof(oid), index, IN_ADDR_SIZE, + bgpTrapList, array_size(bgpTrapList), BGPESTABLISHED); return 0; }