From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Apr 25 12:40:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 793D51065682 for ; Fri, 25 Apr 2008 12:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 373E58FC29 for ; Fri, 25 Apr 2008 12:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m3PCe1do045325 for ; Fri, 25 Apr 2008 12:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m3PCe1QE045324; Fri, 25 Apr 2008 12:40:01 GMT (envelope-from gnats) Resent-Date: Fri, 25 Apr 2008 12:40:01 GMT Resent-Message-Id: <200804251240.m3PCe1QE045324@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, valerio.daelli@gmail.com Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4F021065675 for ; Fri, 25 Apr 2008 12:30:13 +0000 (UTC) (envelope-from cippa@bsd7.ifom-ieo-campus.it) Received: from lupin.ifom-ieo-campus.it (lupin.ifom-ieo-campus.it [85.239.175.139]) by mx1.freebsd.org (Postfix) with ESMTP id 1651A8FC18 for ; Fri, 25 Apr 2008 12:30:12 +0000 (UTC) (envelope-from cippa@bsd7.ifom-ieo-campus.it) Received: (qmail 94507 invoked by uid 106); 25 Apr 2008 12:03:31 -0000 Received: from 85.239.175.163 by lupin.ifom-ieo-campus.it (envelope-from , uid 803) with qmail-scanner-2.01 (clamdscan: 0.93/6808. f-prot: 4.6.8/3.16.16. spamassassin: 3.2.4. Clear:RC:1(85.239.175.163):. Processed in 0.321601 secs); 25 Apr 2008 12:03:31 -0000 Received: from unknown (HELO bsd7.ifom-ieo-campus.it) ([85.239.175.163]) (envelope-sender ) by lupin.ifom-ieo-campus.it (qmail-ldap-1.03) with SMTP for ; 25 Apr 2008 12:03:31 -0000 Received: (from cippa@bsd7.ifom-ieo-campus.it) by bsd7.ifom-ieo-campus.it (mini_sendmail/1.3.6 29jun2005); Fri, 25 Apr 2008 14:03:31 CEST (sender cippa@bsd7.ifom-ieo-campus.it) Message-Id: <20080425123013.1651A8FC18@mx1.freebsd.org> Date: Fri, 25 Apr 2008 12:30:12 +0000 (UTC) From: valerio.daelli@gmail.com To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/123073: [patch] fix for net-snmp 5.4 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: valerio.daelli@gmail.com List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2008 12:40:01 -0000 >Number: 123073 >Category: ports >Synopsis: [patch] fix for net-snmp 5.4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Apr 25 12:40:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Valerio Daelli >Release: FreeBSD 7.0-RELEASE-p1 i386 >Organization: IFOM IEO Campus >Environment: System: FreeBSD bsd7.ifom-ieo-campus.it 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #4: Fri Apr 18 08:46:49 CEST 2008 root@bsd7.ifom-ieo-campus.it:/usr/obj/usr/src/sys/BSD7 i386 >Description: After update of net-snmp to 5.4, someone posted a problem about a missing OID (please see ports/110969). I posted a patch in that PR (the same patch attached here) and the person who raised the problem confirmed me privately that this patch fixes his problem. >How-To-Repeat: >Fix: --- NET-SNMP-MEMORY-BUFFER.patch begins here --- diff -ruN /usr/ports/net-mgmt/net-snmp.orig/files/patch-memory_freebsd.c /usr/ports/net-mgmt/net-snmp/files/patch-memory_freebsd.c --- /usr/ports/net-mgmt/net-snmp.orig/files/patch-memory_freebsd.c 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/net-mgmt/net-snmp/files/patch-memory_freebsd.c 2008-04-14 17:03:37.000000000 +0200 @@ -0,0 +1,39 @@ +--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2006-03-06 17:23:52.000000000 +0100 ++++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-04-14 16:45:19.000000000 +0200 +@@ -47,6 +47,9 @@ + int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM }; + int user_mem_mib[] = { CTL_HW, HW_USERMEM }; + ++ long bufspace; ++ ++ + /* + * Retrieve the memory information from the underlying O/S... + */ +@@ -54,6 +57,7 @@ + sysctl(phys_mem_mib, 2, &phys_mem, &mem_size, NULL, 0); + sysctl(user_mem_mib, 2, &user_mem, &mem_size, NULL, 0); + auto_nlist(SUM_SYMBOL, (char *) &vmem, sizeof(vmem)); ++ auto_nlist(BUFSPACE_SYMBOL, (char *) &bufspace, sizeof(bufspace)); + #ifndef freebsd4 + pagesize = 1024; + #else +@@ -129,6 +133,18 @@ + mem->free = -1; + } + ++ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 1 ); ++ if (!mem) { ++ snmp_log_perror("No Memory Buffer info entry"); ++ } else { ++ if (!mem->descr) ++ mem->descr = strdup("Memory Buffer"); ++ mem->units = pagesize; ++ mem->size = bufspace/pagesize; ++ mem->free = -1; ++ } ++ ++ + nswap = swapmode(pagesize); + mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 1 ); + if (!mem) { --- NET-SNMP-MEMORY-BUFFER.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: