I have a system where I set up Net-SNMP to proxy for Squid
(the caching software).  Squid is running on the same machine
as Net-SNMP.  Its agent is integrated into its cache daemon
and only understands SNMPv1, so I have Squid's agent
listening on 127.0.0.1:3401.

The snmpd.conf file I give to the Net-SNMP agent contains
this line:

proxy -v 1 -c public 127.0.0.1:3401 .1.3.6.1.4.1.3495

The problem occurs when I do a bulk get for a couple of
objects from Squid.  It seems to be any two or more objects.
(A single object will work ok, but why do buld get on one
object.  :-)

Below is a trace from the agent.  I'm running the agent on port 32000
instead of 161 only to isolate it from any other SNMP requests
(for example HP OV doing discovery).  I'm runing the agent on
a Linux box running kernel 2.4.26.

$ /usr/sbin/snmpd -c /etc/snmp/snmpd.conf -C -f -d -p  -Lo 10.1.0.36:32000
NET-SNMP version 5.2.1

Received 61 bytes from UDP: [10.1.2.10]:36951
0000: 30 3B 02 01  01 04 06 70  75 62 6C 69  63 A5 2E 02    0;.....public...
0016: 04 20 90 02  54 02 01 02  02 01 00 30  20 30 0E 06    . ..T......0 0..
0032: 0A 2B 06 01  04 01 9B 27  01 01 01 05  00 30 0E 06    .+.....'.....0..
0048: 0A 2B 06 01  04 01 9B 27  01 01 02 05  00             .+.....'.....

Received SNMP packet(s) from UDP: [10.1.2.10]:36951
 GETBULK message, non-rep=2, max_rep=0
   -- SNMPv2-SMI::enterprises.3495.1.1.1
   -- SNMPv2-SMI::enterprises.3495.1.1.2

Sending 61 bytes to UDP: [127.0.0.1]:3401
0000: 30 3B 02 01  00 04 06 70  75 62 6C 69  63 A1 2E 02    0;.....public...
0016: 04 63 1C A3  89 02 01 00  02 01 00 30  20 30 0E 06    .c.........0 0..
0032: 0A 2B 06 01  04 01 9B 27  01 01 01 05  00 30 0E 06    .+.....'.....0..
0048: 0A 2B 06 01  04 01 9B 27  01 01 02 05  00             .+.....'.....


Received 55 bytes from UDP: [127.0.0.1]:3401 0000: 30 82 00 33 02 01 00 04 06 70 75 62 6C 69 63 A2 0..3.....public. 0016: 82 00 24 02 04 63 1C A3 89 02 01 00 02 01 00 30 ..$..c.........0 0032: 82 00 14 30 82 00 10 06 0B 2B 06 01 04 01 9B 27 ...0.....+.....' 0048: 01 01 01 00 02 01 54 ......T

response to proxy request illegal.  We're screwed.

Received 61 bytes from UDP: [10.1.2.10]:36951
0000: 30 3B 02 01  01 04 06 70  75 62 6C 69  63 A5 2E 02    0;.....public...
0016: 04 20 90 02  54 02 01 02  02 01 00 30  20 30 0E 06    . ..T......0 0..
0032: 0A 2B 06 01  04 01 9B 27  01 01 01 05  00 30 0E 06    .+.....'.....0..
0048: 0A 2B 06 01  04 01 9B 27  01 01 02 05  00             .+.....'.....

Received SNMP packet(s) from UDP: [10.1.2.10]:36951
Segmentation fault

Heres the command I use to reproduce this:

snmpbulkget -c public -v2c -Cn2 -Cr0 myserver:32000 \
   SNMPv2-SMI::enterprises.3495.1.1.1         \
   SNMPv2-SMI::enterprises.3495.1.1.2

I haven't hand-decoded the traffic above, yet, but thought
I'd share what I have so far.  Please let me know if this is a
known issue.

Thanks.

-John






------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to