NetBSD Problem Report #45615
From ryo_on@yk.rim.or.jp Mon Nov 14 19:00:19 2011
Return-Path: <ryo_on@yk.rim.or.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 7155063B8A8
for <gnats-bugs@gnats.netbsd.org>; Mon, 14 Nov 2011 19:00:19 +0000 (UTC)
Message-Id: <20111114190019.7155063B8A8@www.NetBSD.org>
Date: Mon, 14 Nov 2011 19:00:19 +0000 (UTC)
From: ryoon@NetBSD.org
Reply-To: ryoon@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: qemu's tap and bridge networking does not work on recent NetBSD kernel
X-Send-Pr-Version: 3.95
>Number: 45615
>Category: kern
>Synopsis: qemu's tap and bridge networking does not work on recent NetBSD current
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 14 19:05:00 +0000 2011
>Closed-Date: Sun Mar 04 14:08:50 +0000 2012
>Last-Modified: Sun Mar 04 14:08:50 +0000 2012
>Originator: Ryo ONODERA
>Release: NetBSD 5.99.56
>Organization:
>Environment:
System: NetBSD hydrogen.elements.tetera.org 5.99.56 NetBSD 5.99.56 (LEAFGIRL9) #13: Tue Nov 15 03:25:23 JST 2011 root@hydrogen.elements.tetera.org:/usr/obj/sys/arch/i386/compile/LEAFGIRL9 i386
Architecture: i386
Machine: i386
>Description:
On recent NetBSD/i386 5.99.56 kernel, qemu-system-*
from pkgsrc/emulators/qemu (qemu-0.15.1) with tap and bridge device
cannot connect to other hosts.
For example, ping to defaultroute fails.
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/net/if.c.diff?r1=1.253&r2=1.254&f=h
or other recent src/sys/net changes are rollbacked, qemu works fine.
>How-To-Repeat:
For example, on recent kernel, run
$ qemu-system-sparc -M SS-10 -m 128M -hda /home/ryo_on/emul/sparc/3GB.img -nographic -boot c -net nic -net tap,fd=3 3<>/dev/tap0
>Fix:
>Release-Note:
>Audit-Trail:
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/45615: qemu-0.15.1 from pkgsrc/emulators/qemu does not
work on recent NetBSD current
Date: Mon, 12 Dec 2011 07:25:39 +0900 (JST)
for gnats
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>, Date: Sat, 10 Dec 2011 23:17:11 +0900 (JST)
> Hi,
>
> From: Ryo ONODERA <ryo_on@yk.rim.or.jp>, Date: Sat, 10 Dec 2011 22:36:50 +0900 (JST)
>
>> Hi,
>>
>> Anyone who can analyze following PR kern/45615?
>>
>> http://gnats.netbsd.org/45615
>> qemu's tap and bridge networking does not work on recent NetBSD kernel
>>
>> As far as I understand correctly, dyoung@'s
>> http://mail-index.netbsd.org/source-changes/2011/10/28/msg028394.html
>> and related commits breaks qemu's tap and bridge networking.
>>
>> Someone can reproduce PR 45615?
>
> Setting up qemu is hard work...
>
> I have the following problem.
>
> On NetBSD current machine,
> # /sbin/ifconfig tap0 create
> # /sbin/ifconfig bridge0 create
> # /sbin/brconfig bridge0 add msk0
> # /sbin/ifconfig bridge0 up
> # /sbin/ifconfig tap0 0.0.0.0 up
> # /sbin/brconfig bridge0 add tap0
> # dhclient tap0
> bound to 192.168.81.5
>
> On other real machine,
> $ ping 192.168.81.5
> (no reply)
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/45615: qemu-0.15.1 from pkgsrc/emulators/qemu does not
work on recent NetBSD current
Date: Tue, 13 Dec 2011 00:38:41 +0900 (JST)
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>, Date: Tue, 13 Dec 2011 00:34:58 +0900 (JST)
> Hi,
>
> From: Manuel Bouyer <bouyer@antioche.eu.org>, Date: Mon, 12 Dec 2011 11:56:14 +0100
>
>> On Sat, Dec 10, 2011 at 11:17:11PM +0900, Ryo ONODERA wrote:
>>> Setting up qemu is hard work...
>>>
>>> I have the following problem.
>>>
>>> On NetBSD current machine,
>>> # /sbin/ifconfig tap0 create
>>> # /sbin/ifconfig bridge0 create
>>> # /sbin/brconfig bridge0 add msk0
>>> # /sbin/ifconfig bridge0 up
>>> # /sbin/ifconfig tap0 0.0.0.0 up
>>> # /sbin/brconfig bridge0 add tap0
>>> # dhclient tap0
>>> bound to 192.168.81.5
>>
>> please check that both tap0 and msk0 are in promiscous mode at this
>> point.
>> I noticed with a current kernel, my xen setup doesn't work anymore
>> after a fresh boot because my wm0, despite being part of the bridge,
>> is not in promisc mode. Doing
>> brconfig bridge0 delete wm0
>> brconfig bridge0 add wm0
>> fixes it.
>
> It works with qemu-system-sparc from qemu-0.15 and pkgsrc/wip/qemu-1.0 too.
>
> (fresh boot)
> % ifconfig msk0 ; ifconfig tap0
> msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> address: 00:17:42:3d:72:02
> media: Ethernet autoselect (100baseTX full-duplex,flowcontrol,rxpause,txpause)
> status: active
> inet 192.168.81.210 netmask 0xffffff00 broadcast 192.168.81.255
> inet6 fe80::217:42ff:fe3d:7202%msk0 prefixlen 64 scopeid 0x1
> tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
> address: f2:0b:a4:89:52:09
> media: Ethernet autoselect
> inet 0.0.0.0 netmask 0xff000000 broadcast 0.255.255.255
> inet6 fe80::f00b:a4ff:fe89:5209%tap0 prefixlen 64 scopeid 0x4
>
> % brconfig bridge0 delete wm0
> % brconfig bridge0 add wm0
> % ifconfig msk0 ; ifconfig tap0
> % ifconfig msk0 ; ifconfig tap0
> msk0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
> address: 00:17:42:3d:72:02
> media: Ethernet autoselect (100baseTX full-duplex,flowcontrol,rxpause,txpause)
> status: active
> inet 192.168.81.210 netmask 0xffffff00 broadcast 192.168.81.255
> inet6 fe80::217:42ff:fe3d:7202%msk0 prefixlen 64 scopeid 0x1
> tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
> address: f2:0b:a4:89:52:09
> media: Ethernet autoselect
> inet 0.0.0.0 netmask 0xff000000 broadcast 0.255.255.255
> inet6 fe80::f00b:a4ff:fe89:5209%tap0 prefixlen 64 scopeid 0x4
>
>
>> I didn't find the time to analyse any further.
>>
>> --
>> Manuel Bouyer <bouyer@antioche.eu.org>
>> NetBSD: 26 ans d'experience feront toujours la difference
>> --
>>
>>
>
>
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/45615: qemu-0.15.1 from pkgsrc/emulators/qemu does not
work on recent NetBSD current
Date: Mon, 20 Feb 2012 14:34:10 +0900 (JST)
Hi,
dyoung@, Had this problem been solved with
http://mail-index.netbsd.org/source-changes/2011/12/28/msg030096.html ?
Module Name: src
Committed By: dyoung
Date: Wed Dec 28 02:14:57 UTC 2011
Modified Files:
src/sys/net: if.c
Log Message:
Fix ifpromisc() regression: if ifpromisc(ifp, 1) is called, do set
IFF_PROMISC whether ifp is IFF_UP or not, but do not call ifp->if_ioctl
unless ifp is IFF_UP.
To generate a diff of this commit:
cvs rdiff -u -r1.258 -r1.259 src/sys/net/if.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/45615: qemu-0.15.1 from pkgsrc/emulators/qemu does not
work on recent NetBSD current
Date: Sun, 04 Mar 2012 21:19:53 +0900 (JST)
Apparently, the problem is disappeared.
Please close this PR.
Thank you.
--
Ryo ONODERA // ryo_on@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 04 Mar 2012 14:08:50 +0000
State-Changed-Why:
Submitter reports problem is fixed. Thanks for the update!
(It's fine to close your own PRs in these cases.)
>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.