NetBSD Problem Report #44721
From www@NetBSD.org Mon Mar 14 09:15:53 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 3319D63B874
for <gnats-bugs@gnats.NetBSD.org>; Mon, 14 Mar 2011 09:15:53 +0000 (UTC)
Message-Id: <20110314091552.41A5E63B966@www.NetBSD.org>
Date: Mon, 14 Mar 2011 09:15:52 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: gnats-bugs@NetBSD.org
Subject: getprotobynumber() fails in tcpdump
X-Send-Pr-Version: www-1.0
>Number: 44721
>Category: bin
>Synopsis: getprotobynumber() fails in tcpdump
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: martin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 14 09:20:05 +0000 2011
>Closed-Date: Tue May 03 05:14:21 +0000 2011
>Last-Modified: Tue May 03 05:14:21 +0000 2011
>Originator: Antti Kantee
>Release:
>Organization:
>Environment:
>Description:
tcpdump on -current prints "ip-proto-1" for an icmp fragment.
This is the relevant code snippet (print-ip.c):
if ((proto = getprotobynumber(ipds->ip->ip_p)) != NULL)
(void)printf(" %s", proto->p_name);
else
(void)printf(" ip-proto-%d", ipds->ip->ip_p);
Putting a print into the routine confirms that getprotobynumber()
returns NULL. Also, on nb5 tcpdump correctly prints "icmp" here.
Finally, a standalone program calling only getprotobynumber(1)
produces the expected result.
>How-To-Repeat:
run tests/usr.bin/shmif_dumpbus/t_basic::pcap
(a more standalone test is recommended once the problem has been
pinpointed and fixed)
>Fix:
>Release-Note:
>Audit-Trail:
From: "Antti Kantee" <pooka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44721 CVS commit: src/tests/usr.bin/shmif_dumpbus
Date: Mon, 14 Mar 2011 09:25:01 +0000
Module Name: src
Committed By: pooka
Date: Mon Mar 14 09:25:01 UTC 2011
Modified Files:
src/tests/usr.bin/shmif_dumpbus: t_basic.sh
Log Message:
xfail PR bin/44721
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/shmif_dumpbus/t_basic.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: bin-bug-people->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Mon, 11 Apr 2011 18:54:15 +0000
Responsible-Changed-Why:
I think I know what's going on
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44721 CVS commit: src
Date: Mon, 11 Apr 2011 20:03:46 +0000
Module Name: src
Committed By: martin
Date: Mon Apr 11 20:03:45 UTC 2011
Modified Files:
src/distrib/sets/lists/etc: mi
src/etc: Makefile
src/etc/mtree: NetBSD.dist.base special
Log Message:
When run as root, tcpdump will chroot to /var/run/tcpdump - but it can
not look up /etc/protcols in there. So install a copy of /etc/protocols
into the chroot area.
Fixes PR bin/44721.
To generate a diff of this commit:
cvs rdiff -u -r1.221 -r1.222 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.387 -r1.388 src/etc/Makefile
cvs rdiff -u -r1.79 -r1.80 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.135 -r1.136 src/etc/mtree/special
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44721 CVS commit: src/external/bsd/tcpdump/dist
Date: Sun, 17 Apr 2011 11:45:40 +0000
Module Name: src
Committed By: martin
Date: Sun Apr 17 11:45:40 UTC 2011
Modified Files:
src/external/bsd/tcpdump/dist: tcpdump.c
Log Message:
Hint from dsl: make sure to have the /etc/protocols file already open
before doing a chroot() if run as root. Easily done by a setprotoent(1)
call. This is a better (less intrusive) fix for PR bin/44721.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/tcpdump.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 01 May 2011 03:23:12 +0000
State-Changed-Why:
Fixed?
State-Changed-From-To: feedback->closed
State-Changed-By: jruoho@NetBSD.org
State-Changed-When: Tue, 03 May 2011 05:14:21 +0000
State-Changed-Why:
Assume that it is fixed.
>Unformatted:
(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.