From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Apr 11 21:10:03 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C26616A404 for ; Wed, 11 Apr 2007 21:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id F380813C455 for ; Wed, 11 Apr 2007 21:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3BLA2F6009788 for ; Wed, 11 Apr 2007 21:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3BLA2RB009787; Wed, 11 Apr 2007 21:10:02 GMT (envelope-from gnats) Resent-Date: Wed, 11 Apr 2007 21:10:02 GMT Resent-Message-Id: <200704112110.l3BLA2RB009787@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, rubin@physics.umn.edu Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5923B16A401 for ; Wed, 11 Apr 2007 21:07:56 +0000 (UTC) (envelope-from rubin@physics.umn.edu) Received: from florence.spa.umn.edu (florence.spa.umn.edu [128.101.220.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3547113C489 for ; Wed, 11 Apr 2007 21:07:56 +0000 (UTC) (envelope-from rubin@physics.umn.edu) Received: from mrmachenry.spa.umn.edu ([128.101.220.13]) by florence.spa.umn.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.66 (FreeBSD)) (envelope-from ) id 1HbjQp-000B8n-Vm for FreeBSD-gnats-submit@freebsd.org; Wed, 11 Apr 2007 15:28:44 -0500 Received: from mrmachenry.spa.umn.edu (localhost [127.0.0.1]) by mrmachenry.spa.umn.edu (8.13.6/8.13.1) with ESMTP id l3BKShaA004501 for ; Wed, 11 Apr 2007 15:28:43 -0500 (CDT) (envelope-from rubin@mrmachenry.spa.umn.edu) Received: (from root@localhost) by mrmachenry.spa.umn.edu (8.13.6/8.13.1/Submit) id l3BKShcc004500; Wed, 11 Apr 2007 15:28:43 -0500 (CDT) (envelope-from rubin) Message-Id: <200704112028.l3BKShcc004500@mrmachenry.spa.umn.edu> Date: Wed, 11 Apr 2007 15:28:43 -0500 (CDT) From: rubin@physics.umn.edu To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/111491: net-snmp's bulkwalk perl call is broken X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2007 21:10:03 -0000 >Number: 111491 >Category: ports >Synopsis: net-snmp's bulkwalk perl call is broken >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 11 21:10:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Alex Schumann >Release: FreeBSD 6.1-RELEASE-p14 i386 >Organization: UofMN Physics >Environment: System: FreeBSD hostname 6.1-RELEASE-p14 FreeBSD 6.1-RELEASE-p14 #15: Thu Feb 15 16:38:50 CST 2007 root@hostname:/usr/obj/usr/src/sys/PHYS i386 >Description: When calling SNMP::bulkwalk via SNMP::Session, bulkwalk returns its own parameters (@_) instead of the results of the walk. This was fixed upstream several months ago, but I think a backport of the (simple) patch is warranted because bulkwalk is unusable in the current ports state. >How-To-Repeat: To reproduce, run the following perl script against an snmp capable switch: #!/usr/local/bin/perl # use SNMP; use Data::Dumper; $s1 = new SNMP::Session ( 'DestHost' => "some-switch", 'Community' => "public", 'Version' => "2c", 'UseNumeric' => 1, 'UseEnum' => 0, 'UseLongNames' => 1 ); die("Session failed") unless defined($s1); $vars = new SNMP::VarList ( ['sysUpTime'], ['ifNumber'], # NON-repeaters ['ifSpeed'], ['ifDescr']); # Repeated variables. @list = $s1->bulkwalk(2,16, $vars); die("Failed to bulkwalk") unless ($s1->{ErrorNum} == 0); # When the bug is hapning, This will fail with a # runtime error because @list is not the array # expected: if(defined($list[0][0])) { print $list[0][0]->tag . " \n"; } else { die("No list"); } print "Done\n\n"; >Fix: To fix, apply the simple patch committed to the net-snmp SVN Sep 8 2006 3:43:32 by hardaker http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=rev&revision=15175 http://net-snmp.svn.sourceforge.net/viewvc/net-snmp/trunk/net-snmp/perl/SNMP/SNMP.xs?r1=15113&r2=15175&view=patch I tested it here by applying to tho work directory for net-snmp-5.3.1_3, and it solved the problem. Thanks for your time, -Alex >Release-Note: >Audit-Trail: >Unformatted: