Date: Mon, 30 Nov 1998 21:13:51 +0100 (CET) From: marcel@scc.nl To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/8909: ucd-snmp-3.5.3 on FreeBSD-current Message-ID: <199811302013.VAA68309@scones.sup.scc.nl>
next in thread | raw e-mail | index | archive | help
>Number: 8909 >Category: ports >Synopsis: snmpd enters endless loop due to snmpwalk. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 30 12:20:01 PST 1998 >Last-Modified: >Originator: Marcel Moolenaar >Organization: SCC vof >Release: FreeBSD 3.0-CURRENT i386 >Environment: FreeBSD scones.sup.scc.nl 3.0-CURRENT FreeBSD 3.0-CURRENT #9: Fri Nov 27 00:08:21 CET 1998 marcel@scones.sup.scc.nl:/usr/src/sys/compile/SCONES i386 >Description: When using snmpwalk, the agent (snmpd) enters a endless loop. The loop consists of a repeated failing action; writing to the logfile in each iteration and thus filling the filesystem in minutes. Cause: Returncodes are not checked and acted upon. ("never fail" assumed?) >How-To-Repeat: Run snmpwalk after restarting the agent. >Fix: Apply the following patch: *** agent/mibgroup/mibII/tcp.c.orig Mon Nov 30 20:00:46 1998 --- agent/mibgroup/mibII/tcp.c Mon Nov 30 20:04:04 1998 *************** *** 818,823 **** --- 818,824 ---- if((klookup((unsigned long)next, (char *)&inpcb, sizeof (inpcb)) == 0)) { perror("TCP_Count_Connections - inpcb"); + break; } #if !(defined(freebsd2) || defined(netbsd1) || defined(openbsd2)) if (inpcb.INP_PREV_SYMBOL != prev) { /* ??? */ *************** *** 951,962 **** next = tcp_inpcb.INP_NEXT_SYMBOL; ! klookup((unsigned long)next, (char *)&tcp_inpcb, sizeof (tcp_inpcb)); #if !(defined(netbsd1) || defined(freebsd2)) || defined(openbsd2) if (tcp_inpcb.INP_PREV_SYMBOL != tcp_prev) /* ??? */ return(-1); /* "FAILURE" */ #endif /* !(defined(netbsd1) || defined(freebsd2) || defined(openbsd2)) */ ! klookup ( (int)tcp_inpcb.inp_ppcb, (char *)&tcpcb, sizeof (tcpcb)); *State = tcpcb.t_state; #else /* linux */ if (! tcp_prev) --- 952,965 ---- next = tcp_inpcb.INP_NEXT_SYMBOL; ! if (!klookup((unsigned long)next,(char *)&tcp_inpcb,sizeof(tcp_inpcb))) ! return 0; #if !(defined(netbsd1) || defined(freebsd2)) || defined(openbsd2) if (tcp_inpcb.INP_PREV_SYMBOL != tcp_prev) /* ??? */ return(-1); /* "FAILURE" */ #endif /* !(defined(netbsd1) || defined(freebsd2) || defined(openbsd2)) */ ! if (!klookup((int)tcp_inpcb.inp_ppcb, (char *)&tcpcb, sizeof (tcpcb))) ! return 0; *State = tcpcb.t_state; #else /* linux */ if (! tcp_prev) >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811302013.VAA68309>