From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 9 23:05:42 2007 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73E8716A407 for ; Tue, 9 Jan 2007 23:05:42 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id 31A4913C458 for ; Tue, 9 Jan 2007 23:05:42 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 35BD713683D; Wed, 10 Jan 2007 00:05:41 +0100 (CET) Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.6/8.13.6) with ESMTP id l09N4377004913; Wed, 10 Jan 2007 00:04:03 +0100 (CET) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.6/8.13.6/Submit) id l09N43g2004912; Wed, 10 Jan 2007 00:04:03 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Wed, 10 Jan 2007 00:04:03 +0100 To: qemu-devel@nongnu.org, freebsd-emulation@FreeBSD.org Message-ID: <20070109230403.GA4552@saturn.kn-bremen.de> Mail-Followup-To: qemu-devel@nongnu.org, freebsd-emulation@FreeBSD.org References: <20070109204740.GA98620@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070109204740.GA98620@saturn.kn-bremen.de> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Subject: Re: weird slirp problems (dns lookups stopped working, and maybe more) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2007 23:05:42 -0000 On Tue, Jan 09, 2007 at 09:47:40PM +0100, Juergen Lock wrote: > Hi! > > I'm not sure why I didn't notice signs of this earlier (using the > Dec 25 snapshot, I'm on FreeBSD), maybe I really only talked to the host > (10.0.2.2) from inside guests. Anyway, after I first saw it yesterday > night, today I sniffed on the external interface and saw dns requests > of a `host google.com' going out to 224.0.0.251, port 5353, instead > of the dns in resolv.conf. [...] > In between I see these which I'm not sure where they are coming from: > > ... > m_get... > m = 9bd7800 > ip_input... > m = 9bd7800 > m_len = 74 > udp_input... > m = 9bd7800 > iphlen = 20 > udp_input(), ip_dst.s_addr=0xe00000fb, uh_dport=5353 > sosendto... > so = 9b39b80 > m = 9bd7800 > sendto()ing, addr.sin_port=5353, addr.sin_addr.s_addr=224.0.0.251 > m_free... > m = 9bd7000 > ip_slowtimo... > tcp_slowtimo... > ... Ok, garrison on irc just helped solve this mystery: This (the same) one actually goes out first, before the 10.0.2.3 one (I didn't notice at first), and since slirp reuses the socket because the source ip and port hasnt changed (slirp/udp.c lines 172 and up, it doesn't check the dest ip), the second packet with the 10.0.2.3 dest ip (which gets replaced with the hosts's dns) goes out wrong. And the reason this worked previously with the same guest is multicast started working only recently... (Now why tcp stopped working for the other guy I still don't know...) Thanx, Juergen