I'm trying to determine if a community name or userid can contain a backslash.
I've created a v2c SNMP community name called "testing\" and I cannot get it to
work with an snmpwalk (I tried with version 5.7.3 on Linux). I realize that
backslash is an escape character so I made sure to account for that in the
command line.
snmpwalk -m ALL -M . -v 2c -c testing\\ 10.10.11.1 sysUpTime
Timeout: No Response from 10.10.11.1
I did a trace to verify that "testing\" is sent via the network.
sudo tcpdump -n -vvv -i eth0 port 161
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535
bytes
19:02:11.223073 IP (tos 0x0, ttl 64, id 26922, offset 0, flags [DF], proto UDP
(17), length 72)
10.10.11.2.44029 > 10.10.11.1.161: [bad udp cksum 0x2a5c -> 0x6912!] {
SNMPv2c C=testing\ { GetNextRequest(27) R=1008098937 .1.3.6.1.2.1.1.3 } }
19:02:12.224149 IP (tos 0x0, ttl 64, id 26989, offset 0, flags [DF], proto UDP
(17), length 72)
10.10.11.2.44029 > 10.10.11.1.161: [bad udp cksum 0x2a5c -> 0x6912!] {
SNMPv2c C=testing\ { GetNextRequest(27) R=1008098937 .1.3.6.1.2.1.1.3 } }
19:02:13.225253 IP (tos 0x0, ttl 64, id 27002, offset 0, flags [DF], proto UDP
(17), length 72)
I even modified the code in netsnmp_udp_getSecName() to verify that "testing\"
was being compared and both sides of the comparison had that value.
If I remove the backslash it works fine. Is backslash not allowed or is this a
bug?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users