Discussion:
IPv6 and snmptrapd not processing traps
(too old to reply)
Gorman, Kevin
2016-04-14 23:56:21 UTC
Permalink
Hi,
This was resolved by updating /etc/sysconfig/snmptrapd. I had it set as follows:

OPTIONS="-a -A -Lf /var/log/snmptrapd.log -p /var/run/snmptrapd.pid udp:162,udp6:162"

The comma toward the end is the problem. Apparently, the comma is correct if this is defined in snmptrapd.conf, but not on the commandline. Changed the comma to a space and all was well.

OPTIONS="-a -A -Lf /var/log/snmptrapd.log -p /var/run/snmptrapd.pid udp:162 udp6:162"

I think its the snmpd.conf man page, or the FAQ say to use udp6:[::1]:162 and that doesn't work.

If your system doesn't use /etc/sysconfig/snmptrapd, you can edit the init script, or look at it to see where it looks for config info.
Troy Lea
2016-04-15 12:21:27 UTC
Permalink
I've been working with Kevin on this issue and I have more detailed information.


I've been testing IPv6 traps and I am confused about how the trap is being received and processed, compared to IPv4 traps (I suspect there is a bug).

Here is an ipv4 trap that was spooled to /var/spool/snmptt/

1460708637
localhost.localdomain
UDP: [127.0.0.1]:41908->[127.0.0.1]:162
DISMAN-EVENT-MIB::sysUpTimeInstance 0:0:38:59.38
SNMPv2-MIB::snmpTrapOID.0 NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate 123456

Here is an ipv6 trap that was spooled to /var/spool/snmptt/

1460708648
UDP/IPv6: [::1]:50618
UDP/IPv6: [::1]:50618
DISMAN-EVENT-MIB::sysUpTimeInstance 0:0:39:10.94
SNMPv2-MIB::snmpTrapOID.0 NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate 123456


The confusion lies with the 2nd and 3rd line of the trap.

On an IPv4 trap, the 2nd line is:

localhost.localdomain

This is the host that sent the trap (for testing purposes I sent it to myself).
I sent it to 127.0.0.1, and it was translated to localhost.localdomain.
This is the normal behaviour.

On an IPv6 trap, the 2nd line is:

UDP/IPv6: [::1]:50618

This is my first problem.
I believe it should be:
::1
and if dns resolution was working, then it would have resolved to something like localhost6.localdomain6.


On an IPv4 trap, the 3rd line is:

UDP: [127.0.0.1]:41908->[127.0.0.1]:162

It shows me it was received via UDP, what address/port sent it and the destination address/port.
This is the normal behaviour.

On an IPv6 trap, the 3rd line is:

UDP/IPv6: [::1]:50618

This is my second problem. I beleive it should be:

UDP/IPv6: [::1]:50618->[::1]:162


I believe this is an issue with net-snmp due to observation of the (debug) logging.

I start snmptrapd with the following command:

snmptrapd -DALL -f -Lo udp:162 udp6:162 -c /etc/snmp/snmptrapd.conf

In another ssh session I execute the following commands:

snmptrap -v 2c -c public 127.0.0.1 '' NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatRate i 123456

snmptrap -v 2c -c public ::1 '' NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatRate i 123456

Which generates lots of logging information on the screen. I think these lines of out show whatÂ’s going on:

IPv4

trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
2016-04-15 18:23:57 localhost.localdomain [UDP: [127.0.0.1]:41908->[127.0.0.1]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (233938) 0:38:59.38 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456


IPv6

trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
2016-04-15 18:24:08 UDP/IPv6: [::1]:50618 [UDP/IPv6: [::1]:50618]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (235094) 0:39:10.94 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456



I edited the file snmpIPv6BaseDomain.c and found lines 114-116 (which are part of netsnmp_udp6_fmtaddr)

snprintf(tmp, sizeof(tmp), "%s: [%s%s]:%hu", prefix,
inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
INET6_ADDRSTRLEN), scope_id, ntohs(to->sin6_port));

If I change them to:

snprintf(tmp, sizeof(tmp), "%s%s",
inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
INET6_ADDRSTRLEN), scope_id);

Then the second line in the trap changes to:

::1

But it also changes the third line to the same thing, whereas it should be as I described above.


At this point I know I've reached as far as my skills can let me progress.

I do believe there is a bug in the output of lines 2 and 3 of IPv6 traps, if I am mistaken please explain why.
As far as I would assume, the output of an IPv6 trap should follow the same format as an IPv4 trap.


Here are the specific testing details.
OS: CentOS release 6.7 (Final) x64
Linux xi-c6x-x64.box293.local 2.6.32-573.18.1.el6.x86_64 #1 SMP Tue Feb 9 22:46:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
net-snmp: complied from net-snmp-5.7.3.tar.gz

==============Debug logs from when an IPv4 trap was received and processed================
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 8 (fdset 0x7fffdd38f870 set 0)
trace: netsnmp_udpbase_recvfrom(): transports/snmpUDPBaseDomain.c, 187:
udpbase:recv: got source addr: 127.0.0.1
trace: netsnmp_udpbase_recvfrom(): transports/snmpUDPBaseDomain.c, 205:
udpbase:recv: got destination (local) addr 127.0.0.1, iface 1
trace: netsnmp_udpbase_recv(): transports/snmpUDPBaseDomain.c, 424:
netsnmp_udp: recvfrom fd 7 got 93 bytes (from UDP: [127.0.0.1]:41908->[127.0.0.1]:162)
transport:recv: 93 bytes from UDP: [127.0.0.1]:41908->[127.0.0.1]:162
trace: _sess_process_packet(): snmp_api.c, 5198:
sess_process_packet: session 0x7a79e0 fd 7 pkt 0x7b5ea0 length 93
trace: snmp_parse_version(): snmp_api.c, 3494:
dumph_recv: SNMP Version
dumpx_recv: 02 01 01
dumpv_recv: Integer: 1 (0x01)
trace: _snmp_parse(): snmp_api.c, 4089:
snmp_api: Parsing SNMPv2 message...
trace: _snmp_parse(): snmp_api.c, 4099:
dumph_recv: SNMPv2c message

trace: snmp_comstr_parse(): snmp_auth.c, 130:
dumph_recv: SNMP version
dumpx_recv: 02 01 01
dumpv_recv: Integer: 1 (0x01)
trace: snmp_comstr_parse(): snmp_auth.c, 142:
dumph_recv: community string
dumpx_recv: 04 06 70 75 62 6C 69 63
dumpv_recv: String: public
trace: _snmp_parse(): snmp_api.c, 4145:
dumph_recv: PDU
trace: snmp_pdu_parse(): snmp_api.c, 4366:
dumpv_recv: Command TRAP2
trace: snmp_pdu_parse(): snmp_api.c, 4451:
dumph_recv: request_id
dumpx_recv: 02 04 7E 1E B1 B8
dumpv_recv: Integer: 2115940792 (0x7E1EB1B8)
trace: snmp_pdu_parse(): snmp_api.c, 4462:
dumph_recv: error status
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4473:
dumph_recv: error index
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4491:
dumph_recv: VarBindList
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 08 2B 06 01 02 01 01 03 00
dumpv_recv: ObjID: DISMAN-EVENT-MIB::sysUpTimeInstance
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 43 03 03 91 D2
dumpv_recv: UInteger: 233938 (0x391D2)
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 0A 2B 06 01 06 03 01 01 04 01 00
dumpv_recv: ObjID: SNMPv2-MIB::snmpTrapOID.0
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 06 0B 2B 06 01 04 01 BF 08 02 03 00 01
dumpv_recv: ObjID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 0B 2B 06 01 04 01 BF 08 02 03 02 01
dumpv_recv: ObjID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 02 03 01 E2 40
dumpv_recv: Integer: 123456 (0x1E240)
trace: _sess_process_packet(): snmp_api.c, 5245:
sess_process_packet: received message id#0 reqid#2115940792 len 93
trace: snmp_input(): snmptrapd_handlers.c, 969:
snmptrapd: input: a7
trace: snmp_input(): snmptrapd_handlers.c, 1027:
snmptrapd: Trap OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running auth trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 77:
snmptrapd:auth: authorization turned off: not checking
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running pre-global trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: print_handler(): snmptrapd_handlers.c, 718:
snmptrapd: print_handler
trace: print_handler(): snmptrapd_handlers.c, 771:
snmptrapd: v2/3 format
trace: netsnmp_gethostbyaddr(): system.c, 962:
dns:gethostbyaddr: resolving 127.0.0.1
trace: netsnmp_gethostbyaddr(): system.c, 991:
dns:gethostbyaddr: addr resolved okay
trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
2016-04-15 18:23:57 localhost.localdomain [UDP: [127.0.0.1]:41908->[127.0.0.1]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (233938) 0:38:59.38 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running trap specific handlers
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 560:
snmptrapd:lookup: Looking up Trap OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 611:
snmptrapd:lookup: get_traphandler default (0x7a9420)
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: command_handler(): snmptrapd_handlers.c, 802:
snmptrapd: command_handler
trace: command_handler(): snmptrapd_handlers.c, 803:
snmptrapd: token = '/usr/sbin/snmptthandler'
trace: netsnmp_ds_set_boolean(): default_store.c, 216:
netsnmp_ds_set_boolean: Setting LIB:13 = 1/True
trace: command_handler(): snmptrapd_handlers.c, 842:
snmptrapd: execute format
trace: netsnmp_gethostbyaddr(): system.c, 962:
dns:gethostbyaddr: resolving 127.0.0.1
trace: netsnmp_gethostbyaddr(): system.c, 991:
dns:gethostbyaddr: addr resolved okay
trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
trace: run_shell_command(): mibgroup/utilities/execute.c, 59:
run_shell_command: running /usr/sbin/snmptthandler
trace: run_shell_command(): mibgroup/utilities/execute.c, 60:
run:shell: running '/usr/sbin/snmptthandler'
trace: netsnmp_ds_set_boolean(): default_store.c, 216:
netsnmp_ds_set_boolean: Setting LIB:13 = 0/False
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running global handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: notification_handler(): snmptrapd_handlers.c, 929:
snmptrapd: notification_handler
trace: log_notification(): notification-log-mib/notification_log.c, 603:
notification_log: logging something
trace: log_notification(): notification-log-mib/notification_log.c, 755:
notification_log: adding a row to the variables table
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.1.1
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: log_notification(): notification-log-mib/notification_log.c, 755:
notification_log: adding a row to the variables table
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.1.2
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.1
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: check_log_size(): notification-log-mib/notification_log.c, 154:
notification_log: logged notifications 1; max 1000
trace: log_notification(): notification-log-mib/notification_log.c, 769:
notification_log: done logging something
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 5 (fdset 0x7fffdd38f870 set 0)
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 3 (fdset 0x7fffdd38f870 set 0)
trace: snmp_sess_select_info2_flags(): snmp_api.c, 6047:
sess_select: for all sessions: 8 7 5 3
sess_select: next alarm at 2348.194903 sec
verbose:sess_select: timer due in 8.763879 sec


==============Debug logs from when an IPv6 trap was received and processed================
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = (nil), data = 0x7a7fa0, len = 28
trace: netsnmp_udp6_recv(): transports/snmpUDPIPv6Domain.c, 131:
netsnmp_udp6: recvfrom fd 8 got 93 bytes (from UDP/IPv6: [::1]:50618)
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
transport:recv: 93 bytes from UDP/IPv6: [::1]:50618
trace: _sess_process_packet(): snmp_api.c, 5198:
sess_process_packet: session 0x7a71f0 fd 8 pkt 0x7b5ea0 length 93
trace: snmp_parse_version(): snmp_api.c, 3494:
dumph_recv: SNMP Version
dumpx_recv: 02 01 01
dumpv_recv: Integer: 1 (0x01)
trace: _snmp_parse(): snmp_api.c, 4089:
snmp_api: Parsing SNMPv2 message...
trace: _snmp_parse(): snmp_api.c, 4099:
dumph_recv: SNMPv2c message

trace: snmp_comstr_parse(): snmp_auth.c, 130:
dumph_recv: SNMP version
dumpx_recv: 02 01 01
dumpv_recv: Integer: 1 (0x01)
trace: snmp_comstr_parse(): snmp_auth.c, 142:
dumph_recv: community string
dumpx_recv: 04 06 70 75 62 6C 69 63
dumpv_recv: String: public
trace: _snmp_parse(): snmp_api.c, 4145:
dumph_recv: PDU
trace: snmp_pdu_parse(): snmp_api.c, 4366:
dumpv_recv: Command TRAP2
trace: snmp_pdu_parse(): snmp_api.c, 4451:
dumph_recv: request_id
dumpx_recv: 02 04 57 1E 80 09
dumpv_recv: Integer: 1461616649 (0x571E8009)
trace: snmp_pdu_parse(): snmp_api.c, 4462:
dumph_recv: error status
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4473:
dumph_recv: error index
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4491:
dumph_recv: VarBindList
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 08 2B 06 01 02 01 01 03 00
dumpv_recv: ObjID: DISMAN-EVENT-MIB::sysUpTimeInstance
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 43 03 03 96 56
dumpv_recv: UInteger: 235094 (0x39656)
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 0A 2B 06 01 06 03 01 01 04 01 00
dumpv_recv: ObjID: SNMPv2-MIB::snmpTrapOID.0
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 06 0B 2B 06 01 04 01 BF 08 02 03 00 01
dumpv_recv: ObjID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 0B 2B 06 01 04 01 BF 08 02 03 02 01
dumpv_recv: ObjID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 02 03 01 E2 40
dumpv_recv: Integer: 123456 (0x1E240)
trace: _sess_process_packet(): snmp_api.c, 5245:
sess_process_packet: received message id#0 reqid#1461616649 len 93
trace: snmp_input(): snmptrapd_handlers.c, 969:
snmptrapd: input: a7
trace: snmp_input(): snmptrapd_handlers.c, 1027:
snmptrapd: Trap OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running auth trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 77:
snmptrapd:auth: authorization turned off: not checking
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running pre-global trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: print_handler(): snmptrapd_handlers.c, 718:
snmptrapd: print_handler
trace: print_handler(): snmptrapd_handlers.c, 771:
snmptrapd: v2/3 format
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
2016-04-15 18:24:08 UDP/IPv6: [::1]:50618 [UDP/IPv6: [::1]:50618]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (235094) 0:39:10.94 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running trap specific handlers
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 560:
snmptrapd:lookup: Looking up Trap OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 611:
snmptrapd:lookup: get_traphandler default (0x7a9420)
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: command_handler(): snmptrapd_handlers.c, 802:
snmptrapd: command_handler
trace: command_handler(): snmptrapd_handlers.c, 803:
snmptrapd: token = '/usr/sbin/snmptthandler'
trace: netsnmp_ds_set_boolean(): default_store.c, 216:
netsnmp_ds_set_boolean: Setting LIB:13 = 1/True
trace: command_handler(): snmptrapd_handlers.c, 842:
snmptrapd: execute format
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
trace: run_shell_command(): mibgroup/utilities/execute.c, 59:
run_shell_command: running /usr/sbin/snmptthandler
trace: run_shell_command(): mibgroup/utilities/execute.c, 60:
run:shell: running '/usr/sbin/snmptthandler'
trace: netsnmp_ds_set_boolean(): default_store.c, 216:
netsnmp_ds_set_boolean: Setting LIB:13 = 0/False
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running global handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: notification_handler(): snmptrapd_handlers.c, 929:
snmptrapd: notification_handler
trace: log_notification(): notification-log-mib/notification_log.c, 603:
notification_log: logging something
trace: log_notification(): notification-log-mib/notification_log.c, 755:
notification_log: adding a row to the variables table
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.2.1
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: log_notification(): notification-log-mib/notification_log.c, 755:
notification_log: adding a row to the variables table
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.2.2
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.2
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: check_log_size(): notification-log-mib/notification_log.c, 154:
notification_log: logged notifications 2; max 1000
trace: log_notification(): notification-log-mib/notification_log.c, 769:
notification_log: done logging something
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 7 (fdset 0x7fffdd38f870 set 0)
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 5 (fdset 0x7fffdd38f870 set 0)
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 3 (fdset 0x7fffdd38f870 set 0)
trace: snmp_sess_select_info2_flags(): snmp_api.c, 6047:
sess_select: for all sessions: 8 7 5 3
sess_select: next alarm at 2363.198740 sec
verbose:sess_select: timer due in 12.207526 sec
Gorman, Kevin
2016-04-15 17:58:48 UTC
Permalink
Once I changed the args to "udp:162 udp6:162" it works fine. The difference is the space rather than a comma. Also, ::1/loopback is wrong.

From: Troy Lea [mailto:***@hotmail.com]
Sent: Friday, April 15, 2016 7:21 AM
To: net-snmp-***@lists.sourceforge.net
Subject: [E] RE: IPv6 and snmptrapd not processing traps


I've been working with Kevin on this issue and I have more detailed information.



I've been testing IPv6 traps and I am confused about how the trap is being received and processed, compared to IPv4 traps (I suspect there is a bug).

Here is an ipv4 trap that was spooled to /var/spool/snmptt/

1460708637
localhost.localdomain
UDP: [127.0.0.1]:41908->[127.0.0.1]:162
DISMAN-EVENT-MIB::sysUpTimeInstance 0:0:38:59.38
SNMPv2-MIB::snmpTrapOID.0 NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate 123456

Here is an ipv6 trap that was spooled to /var/spool/snmptt/

1460708648
UDP/IPv6: [::1]:50618
UDP/IPv6: [::1]:50618
DISMAN-EVENT-MIB::sysUpTimeInstance 0:0:39:10.94
SNMPv2-MIB::snmpTrapOID.0 NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate 123456


The confusion lies with the 2nd and 3rd line of the trap.

On an IPv4 trap, the 2nd line is:

localhost.localdomain

This is the host that sent the trap (for testing purposes I sent it to myself).
I sent it to 127.0.0.1, and it was translated to localhost.localdomain.
This is the normal behaviour.

On an IPv6 trap, the 2nd line is:

UDP/IPv6: [::1]:50618

This is my first problem.
I believe it should be:
::1
and if dns resolution was working, then it would have resolved to something like localhost6.localdomain6.


On an IPv4 trap, the 3rd line is:

UDP: [127.0.0.1]:41908->[127.0.0.1]:162

It shows me it was received via UDP, what address/port sent it and the destination address/port.
This is the normal behaviour.

On an IPv6 trap, the 3rd line is:

UDP/IPv6: [::1]:50618

This is my second problem. I beleive it should be:

UDP/IPv6: [::1]:50618->[::1]:162


I believe this is an issue with net-snmp due to observation of the (debug) logging.

I start snmptrapd with the following command:

snmptrapd -DALL -f -Lo udp:162 udp6:162 -c /etc/snmp/snmptrapd.conf

In another ssh session I execute the following commands:

snmptrap -v 2c -c public 127.0.0.1 '' NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatRate i 123456

snmptrap -v 2c -c public ::1 '' NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatRate i 123456

Which generates lots of logging information on the screen. I think these lines of out show what's going on:

IPv4

trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
2016-04-15 18:23:57 localhost.localdomain [UDP: [127.0.0.1]:41908->[127.0.0.1]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (233938) 0:38:59.38 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456


IPv6

trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
2016-04-15 18:24:08 UDP/IPv6: [::1]:50618 [UDP/IPv6: [::1]:50618]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (235094) 0:39:10.94 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456



I edited the file snmpIPv6BaseDomain.c and found lines 114-116 (which are part of netsnmp_udp6_fmtaddr)

snprintf(tmp, sizeof(tmp), "%s: [%s%s]:%hu", prefix,
inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
INET6_ADDRSTRLEN), scope_id, ntohs(to->sin6_port));

If I change them to:

snprintf(tmp, sizeof(tmp), "%s%s",
inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr,
INET6_ADDRSTRLEN), scope_id);

Then the second line in the trap changes to:

::1

But it also changes the third line to the same thing, whereas it should be as I described above.


At this point I know I've reached as far as my skills can let me progress.

I do believe there is a bug in the output of lines 2 and 3 of IPv6 traps, if I am mistaken please explain why.
As far as I would assume, the output of an IPv6 trap should follow the same format as an IPv4 trap.


Here are the specific testing details.
OS: CentOS release 6.7 (Final) x64
Linux xi-c6x-x64.box293.local 2.6.32-573.18.1.el6.x86_64 #1 SMP Tue Feb 9 22:46:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
net-snmp: complied from net-snmp-5.7.3.tar.gz

==============Debug logs from when an IPv4 trap was received and processed================
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 8 (fdset 0x7fffdd38f870 set 0)
trace: netsnmp_udpbase_recvfrom(): transports/snmpUDPBaseDomain.c, 187:
udpbase:recv: got source addr: 127.0.0.1
trace: netsnmp_udpbase_recvfrom(): transports/snmpUDPBaseDomain.c, 205:
udpbase:recv: got destination (local) addr 127.0.0.1, iface 1
trace: netsnmp_udpbase_recv(): transports/snmpUDPBaseDomain.c, 424:
netsnmp_udp: recvfrom fd 7 got 93 bytes (from UDP: [127.0.0.1]:41908->[127.0.0.1]:162)
transport:recv: 93 bytes from UDP: [127.0.0.1]:41908->[127.0.0.1]:162
trace: _sess_process_packet(): snmp_api.c, 5198:
sess_process_packet: session 0x7a79e0 fd 7 pkt 0x7b5ea0 length 93
trace: snmp_parse_version(): snmp_api.c, 3494:
dumph_recv: SNMP Version
dumpx_recv: 02 01 01
dumpv_recv: Integer: 1 (0x01)
trace: _snmp_parse(): snmp_api.c, 4089:
snmp_api: Parsing SNMPv2 message...
trace: _snmp_parse(): snmp_api.c, 4099:
dumph_recv: SNMPv2c message

trace: snmp_comstr_parse(): snmp_auth.c, 130:
dumph_recv: SNMP version
dumpx_recv: 02 01 01
dumpv_recv: Integer: 1 (0x01)
trace: snmp_comstr_parse(): snmp_auth.c, 142:
dumph_recv: community string
dumpx_recv: 04 06 70 75 62 6C 69 63
dumpv_recv: String: public
trace: _snmp_parse(): snmp_api.c, 4145:
dumph_recv: PDU
trace: snmp_pdu_parse(): snmp_api.c, 4366:
dumpv_recv: Command TRAP2
trace: snmp_pdu_parse(): snmp_api.c, 4451:
dumph_recv: request_id
dumpx_recv: 02 04 7E 1E B1 B8
dumpv_recv: Integer: 2115940792 (0x7E1EB1B8)
trace: snmp_pdu_parse(): snmp_api.c, 4462:
dumph_recv: error status
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4473:
dumph_recv: error index
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4491:
dumph_recv: VarBindList
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 08 2B 06 01 02 01 01 03 00
dumpv_recv: ObjID: DISMAN-EVENT-MIB::sysUpTimeInstance
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 43 03 03 91 D2
dumpv_recv: UInteger: 233938 (0x391D2)
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 0A 2B 06 01 06 03 01 01 04 01 00
dumpv_recv: ObjID: SNMPv2-MIB::snmpTrapOID.0
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 06 0B 2B 06 01 04 01 BF 08 02 03 00 01
dumpv_recv: ObjID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 0B 2B 06 01 04 01 BF 08 02 03 02 01
dumpv_recv: ObjID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 02 03 01 E2 40
dumpv_recv: Integer: 123456 (0x1E240)
trace: _sess_process_packet(): snmp_api.c, 5245:
sess_process_packet: received message id#0 reqid#2115940792 len 93
trace: snmp_input(): snmptrapd_handlers.c, 969:
snmptrapd: input: a7
trace: snmp_input(): snmptrapd_handlers.c, 1027:
snmptrapd: Trap OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running auth trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 77:
snmptrapd:auth: authorization turned off: not checking
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running pre-global trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: print_handler(): snmptrapd_handlers.c, 718:
snmptrapd: print_handler
trace: print_handler(): snmptrapd_handlers.c, 771:
snmptrapd: v2/3 format
trace: netsnmp_gethostbyaddr(): system.c, 962:
dns:gethostbyaddr: resolving 127.0.0.1
trace: netsnmp_gethostbyaddr(): system.c, 991:
dns:gethostbyaddr: addr resolved okay
trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
2016-04-15 18:23:57 localhost.localdomain [UDP: [127.0.0.1]:41908->[127.0.0.1]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (233938) 0:38:59.38 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running trap specific handlers
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 560:
snmptrapd:lookup: Looking up Trap OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 611:
snmptrapd:lookup: get_traphandler default (0x7a9420)
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: command_handler(): snmptrapd_handlers.c, 802:
snmptrapd: command_handler
trace: command_handler(): snmptrapd_handlers.c, 803:
snmptrapd: token = '/usr/sbin/snmptthandler'
trace: netsnmp_ds_set_boolean(): default_store.c, 216:
netsnmp_ds_set_boolean: Setting LIB:13 = 1/True
trace: command_handler(): snmptrapd_handlers.c, 842:
snmptrapd: execute format
trace: netsnmp_gethostbyaddr(): system.c, 962:
dns:gethostbyaddr: resolving 127.0.0.1
trace: netsnmp_gethostbyaddr(): system.c, 991:
dns:gethostbyaddr: addr resolved okay
trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
trace: run_shell_command(): mibgroup/utilities/execute.c, 59:
run_shell_command: running /usr/sbin/snmptthandler
trace: run_shell_command(): mibgroup/utilities/execute.c, 60:
run:shell: running '/usr/sbin/snmptthandler'
trace: netsnmp_ds_set_boolean(): default_store.c, 216:
netsnmp_ds_set_boolean: Setting LIB:13 = 0/False
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running global handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: notification_handler(): snmptrapd_handlers.c, 929:
snmptrapd: notification_handler
trace: log_notification(): notification-log-mib/notification_log.c, 603:
notification_log: logging something
trace: log_notification(): notification-log-mib/notification_log.c, 755:
notification_log: adding a row to the variables table
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.1.1
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: log_notification(): notification-log-mib/notification_log.c, 755:
notification_log: adding a row to the variables table
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.1.2
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.1
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: check_log_size(): notification-log-mib/notification_log.c, 154:
notification_log: logged notifications 1; max 1000
trace: log_notification(): notification-log-mib/notification_log.c, 769:
notification_log: done logging something
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 5 (fdset 0x7fffdd38f870 set 0)
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 3 (fdset 0x7fffdd38f870 set 0)
trace: snmp_sess_select_info2_flags(): snmp_api.c, 6047:
sess_select: for all sessions: 8 7 5 3
sess_select: next alarm at 2348.194903 sec
verbose:sess_select: timer due in 8.763879 sec


==============Debug logs from when an IPv6 trap was received and processed================
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = (nil), data = 0x7a7fa0, len = 28
trace: netsnmp_udp6_recv(): transports/snmpUDPIPv6Domain.c, 131:
netsnmp_udp6: recvfrom fd 8 got 93 bytes (from UDP/IPv6: [::1]:50618)
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
transport:recv: 93 bytes from UDP/IPv6: [::1]:50618
trace: _sess_process_packet(): snmp_api.c, 5198:
sess_process_packet: session 0x7a71f0 fd 8 pkt 0x7b5ea0 length 93
trace: snmp_parse_version(): snmp_api.c, 3494:
dumph_recv: SNMP Version
dumpx_recv: 02 01 01
dumpv_recv: Integer: 1 (0x01)
trace: _snmp_parse(): snmp_api.c, 4089:
snmp_api: Parsing SNMPv2 message...
trace: _snmp_parse(): snmp_api.c, 4099:
dumph_recv: SNMPv2c message

trace: snmp_comstr_parse(): snmp_auth.c, 130:
dumph_recv: SNMP version
dumpx_recv: 02 01 01
dumpv_recv: Integer: 1 (0x01)
trace: snmp_comstr_parse(): snmp_auth.c, 142:
dumph_recv: community string
dumpx_recv: 04 06 70 75 62 6C 69 63
dumpv_recv: String: public
trace: _snmp_parse(): snmp_api.c, 4145:
dumph_recv: PDU
trace: snmp_pdu_parse(): snmp_api.c, 4366:
dumpv_recv: Command TRAP2
trace: snmp_pdu_parse(): snmp_api.c, 4451:
dumph_recv: request_id
dumpx_recv: 02 04 57 1E 80 09
dumpv_recv: Integer: 1461616649 (0x571E8009)
trace: snmp_pdu_parse(): snmp_api.c, 4462:
dumph_recv: error status
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4473:
dumph_recv: error index
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
trace: snmp_pdu_parse(): snmp_api.c, 4491:
dumph_recv: VarBindList
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 08 2B 06 01 02 01 01 03 00
dumpv_recv: ObjID: DISMAN-EVENT-MIB::sysUpTimeInstance
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 43 03 03 96 56
dumpv_recv: UInteger: 235094 (0x39656)
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 0A 2B 06 01 06 03 01 01 04 01 00
dumpv_recv: ObjID: SNMPv2-MIB::snmpTrapOID.0
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 06 0B 2B 06 01 04 01 BF 08 02 03 00 01
dumpv_recv: ObjID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: snmp_pdu_parse(): snmp_api.c, 4521:
dumph_recv: VarBind
trace: snmp_parse_var_op(): snmp.c, 164:
dumph_recv: Name
dumpx_recv: 06 0B 2B 06 01 04 01 BF 08 02 03 02 01
dumpv_recv: ObjID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate
trace: snmp_pdu_parse(): snmp_api.c, 4530:
dumph_recv: Value
dumpx_recv: 02 03 01 E2 40
dumpv_recv: Integer: 123456 (0x1E240)
trace: _sess_process_packet(): snmp_api.c, 5245:
sess_process_packet: received message id#0 reqid#1461616649 len 93
trace: snmp_input(): snmptrapd_handlers.c, 969:
snmptrapd: input: a7
trace: snmp_input(): snmptrapd_handlers.c, 1027:
snmptrapd: Trap OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running auth trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: netsnmp_trapd_auth(): snmptrapd_auth.c, 77:
snmptrapd:auth: authorization turned off: not checking
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running pre-global trap handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: print_handler(): snmptrapd_handlers.c, 718:
snmptrapd: print_handler
trace: print_handler(): snmptrapd_handlers.c, 771:
snmptrapd: v2/3 format
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
2016-04-15 18:24:08 UDP/IPv6: [::1]:50618 [UDP/IPv6: [::1]:50618]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (235094) 0:39:10.94 SNMPv2-MIB::snmpTrapOID.0 = OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatRate = INTEGER: 123456
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running trap specific handlers
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 560:
snmptrapd:lookup: Looking up Trap OID: NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 611:
snmptrapd:lookup: get_traphandler default (0x7a9420)
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: command_handler(): snmptrapd_handlers.c, 802:
snmptrapd: command_handler
trace: command_handler(): snmptrapd_handlers.c, 803:
snmptrapd: token = '/usr/sbin/snmptthandler'
trace: netsnmp_ds_set_boolean(): default_store.c, 216:
netsnmp_ds_set_boolean: Setting LIB:13 = 1/True
trace: command_handler(): snmptrapd_handlers.c, 842:
snmptrapd: execute format
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
trace: netsnmp_ipv6_fmtaddr(): transports/snmpIPv6BaseDomain.c, 97:
netsnmp_ipv6: fmtaddr: t = 0x7a5d90, data = 0x7a7fa0, len = 28
trace: sprint_realloc_by_type(): mib.c, 1999:
output: sprint_by_type, type 67
trace: run_shell_command(): mibgroup/utilities/execute.c, 59:
run_shell_command: running /usr/sbin/snmptthandler
trace: run_shell_command(): mibgroup/utilities/execute.c, 60:
run:shell: running '/usr/sbin/snmptthandler'
trace: netsnmp_ds_set_boolean(): default_store.c, 216:
netsnmp_ds_set_boolean: Setting LIB:13 = 0/False
trace: snmp_input(): snmptrapd_handlers.c, 1053:
snmptrapd: Running global handlers
trace: netsnmp_trapd_check_auth(): snmptrapd_auth.c, 172:
snmptrapd:auth: authorization turned off
trace: notification_handler(): snmptrapd_handlers.c, 929:
snmptrapd: notification_handler
trace: log_notification(): notification-log-mib/notification_log.c, 603:
notification_log: logging something
trace: log_notification(): notification-log-mib/notification_log.c, 755:
notification_log: adding a row to the variables table
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.2.1
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: log_notification(): notification-log-mib/notification_log.c, 755:
notification_log: adding a row to the variables table
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.2.2
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: build_oid_noalloc(): mib.c, 3774:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.2
trace: netsnmp_table_data_add_row(): helpers/table_data.c, 248:
table_data_add_data: added something...
trace: check_log_size(): notification-log-mib/notification_log.c, 154:
notification_log: logged notifications 2; max 1000
trace: log_notification(): notification-log-mib/notification_log.c, 769:
notification_log: done logging something
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 7 (fdset 0x7fffdd38f870 set 0)
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 5 (fdset 0x7fffdd38f870 set 0)
trace: _sess_read(): snmp_api.c, 5538:
sess_read: not reading 3 (fdset 0x7fffdd38f870 set 0)
trace: snmp_sess_select_info2_flags(): snmp_api.c, 6047:
sess_select: for all sessions: 8 7 5 3
sess_select: next alarm at 2363.198740 sec
verbose:sess_select: timer due in 12.207526 sec

Loading...