NetBSD Problem Report #41887

From Wolfgang.Stukenbrock@nagler-company.com  Fri Aug 14 08:11:52 2009
Return-Path: <Wolfgang.Stukenbrock@nagler-company.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id CC0E463C284
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 14 Aug 2009 08:11:51 +0000 (UTC)
Message-Id: <20090814081149.253A94EA9FE@s012.nagler-company.com>
Date: Fri, 14 Aug 2009 10:11:49 +0200 (CEST)
From: Wolfgang.Stukenbrock@nagler-company.com
Reply-To: Wolfgang.Stukenbrock@nagler-company.com
To: gnats-bugs@gnats.NetBSD.org
Subject: wrong mode selected in ipf program for hash-entries
X-Send-Pr-Version: 3.95

>Number:         41887
>Category:       bin
>Synopsis:       wrong mode selected in ipf program for hash-entries
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 14 08:15:00 +0000 2009
>Last-Modified:  Fri Aug 14 08:25:01 +0000 2009
>Originator:     Wolfgang Stukenbrock
>Release:        NetBSD 4.0
>Organization:
Dr. Nagler & Company GmbH

>Environment:


System: NetBSD s012 4.0 NetBSD 4.0 (NSW-S012) #9: Fri Mar 13 12:31:52 CET 2009 wgstuken@s012:/usr/src/sys/arch/amd64/compile/NSW-S012 amd64
Architecture: x86_64
Machine: amd64
>Description:
	In /usr/src/dist/ipf/tools/ipf_y.y while parsing an "addr" the variable "pooled" is set instead of "hashed" in the 5.th variant
	of an "addr". This looks like a copy-paste error. In all other cases the variable name correspond to the keyword just parsed.
	I'm not shure about the effect of this - we have found it while searching other problems in the ippoool(5) implementation.
>How-To-Repeat:
	found bey a look into the source code - you may define a "hash / YY_STR" line - the system should get into problems
>Fix:
	The following patch should be applied to /usr/src/dist/ipf/tools/ipf_y.y


--- ipf_y.y	2009/08/14 07:54:12	1.1
+++ ipf_y.y	2009/08/14 07:54:52
@@ -860,7 +860,7 @@
 					  $$.a.iplookuptype = IPLT_HASH;
 					  $$.a.iplookupsubtype = 0;
 					  $$.a.iplookupnum = $3; }
-	| hash '/' YY_STR		{ pooled = 1;
+	| hash '/' YY_STR		{ hashed = 1;
 					  $$.a.iplookuptype = IPLT_HASH;
 					  $$.a.iplookupsubtype = 1;
 					  strncpy($$.a.iplookupname, $3,

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org, Darren Reed <darrenr@NetBSD.org>
Cc: 
Subject: Re: bin/41887: wrong mode selected in ipf program for hash-entries
Date: Fri, 14 Aug 2009 10:24:10 +0200

 On Fri, Aug 14, 2009 at 08:15:00AM +0000, Wolfgang.Stukenbrock@nagler-company.com wrote:
 > --- ipf_y.y	2009/08/14 07:54:12	1.1
 > +++ ipf_y.y	2009/08/14 07:54:52
 > @@ -860,7 +860,7 @@
 >  					  $$.a.iplookuptype = IPLT_HASH;
 >  					  $$.a.iplookupsubtype = 0;
 >  					  $$.a.iplookupnum = $3; }
 > -	| hash '/' YY_STR		{ pooled = 1;
 > +	| hash '/' YY_STR		{ hashed = 1;
 >  					  $$.a.iplookuptype = IPLT_HASH;
 >  					  $$.a.iplookupsubtype = 1;
 >  					  strncpy($$.a.iplookupname, $3,

 Same bug exists in -current and netbsd-5 (patch looks fine to me).

 Martin

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.