From owner-freebsd-ports Mon Nov 30 12:19:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA10033 for freebsd-ports-outgoing; Mon, 30 Nov 1998 12:19:24 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA10017 for ; Mon, 30 Nov 1998 12:19:22 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from Unknown UID 563@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id MAA06614; Mon, 30 Nov 1998 12:20:01 -0800 (PST) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA09689 for ; Mon, 30 Nov 1998 12:16:10 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i101.ztm.euronet.nl [194.134.112.62]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id VAA07387 from for ; Mon, 30 Nov 1998 21:14:19 +0100 (MET) Received: (from root@localhost) by scones.sup.scc.nl (8.9.1/8.9.1) id VAA68309; Mon, 30 Nov 1998 21:13:51 +0100 (CET) (envelope-from marcel) Message-Id: <199811302013.VAA68309@scones.sup.scc.nl> Date: Mon, 30 Nov 1998 21:13:51 +0100 (CET) From: marcel@scc.nl Reply-To: marcel@scc.nl To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: ports/8909: ucd-snmp-3.5.3 on FreeBSD-current Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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