On 2010/10/15 10:42, Stuart Henderson wrote:
> $ snmpwalk -v2c -c public $SOMEHOST OPENBSD-MEM-MIB::memIfName
> <segfault>
> 
> introduced when per-interface livelock counters were removed.
> the variable should probably be removed completely sometime, but is
> this ok for now?

it probably would help if I include the backtrace too.

#0  0x07bbfb51 in strlen () from /usr/lib/libc.so.57.0
#1  0x1c0050ff in ber_add_string (prev=0x7cce1260, string=0x0) at 
/usr/src/usr.sbin/snmpd/ber.c:263
#2  0x1c00deb0 in mib_memiftable (oid=0x3c010508, o=0xcfbb99d0, elm=0xcfbb9970) 
at /usr/src/usr.sbin/snmpd/mib.c:1431
#3  0x1c009acc in mps_getnextreq (root=0x7cce1240, o=0xcfbb99d0) at 
/usr/src/usr.sbin/snmpd/mps.c:237
#4  0x1c008a84 in snmpe_parse (ss=0xcfbca284, root=0x7cce10e0, msg=0xcfbca068) 
at /usr/src/usr.sbin/snmpd/snmpe.c:637
#5  0x1c00904a in snmpe_recvmsg (fd=6, sig=2, arg=0x867bd7b0) at 
/usr/src/usr.sbin/snmpd/snmpe.c:752
#6  0x019810b2 in event_base_loop (base=0x8382e800, flags=0) at 
/usr/src/lib/libevent/event.c:402
#7  0x01981369 in event_loop (flags=0) at /usr/src/lib/libevent/event.c:478
#8  0x0198138e in event_dispatch () at /usr/src/lib/libevent/event.c:416
#9  0x1c007fba in snmpe (x_env=0x867bd7b0, pipe_parent2snmpe=0x3c01d9e8) at 
/usr/src/usr.sbin/snmpd/snmpe.c:167
#10 0x1c0167a2 in main (argc=0, argv=0xcfbca6bc) at 
/usr/src/usr.sbin/snmpd/snmpd.c:184

> 
> Index: mib.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/snmpd/mib.c,v
> retrieving revision 1.42
> diff -u -p -r1.42 mib.c
> --- mib.c     23 Sep 2010 10:49:55 -0000      1.42
> +++ mib.c     15 Oct 2010 09:39:39 -0000
> @@ -1428,7 +1428,8 @@ mib_memiftable(struct oid *oid, struct b
>               ber = ber_add_string(ber, kif->if_name);
>               break;
>       case 2:
> -             ber = ber_add_string(ber, 0);
> +             ber = ber_add_integer(ber, 0);
> +             ber_set_header(ber, BER_CLASS_APPLICATION, SNMP_T_COUNTER64);
>               break;
>       default:
>               return (-1);

Reply via email to