Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H4ONL-0003Vn-Ct for qemu-devel@nongnu.org; Tue, 09 Jan 2007 16:19:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H4ONB-0003T5-4t for qemu-devel@nongnu.org; Tue, 09 Jan 2007 16:19:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4ONA-0003T2-VS for qemu-devel@nongnu.org; Tue, 09 Jan 2007 16:19:09 -0500 Received: from [212.63.36.242] (helo=gwyn.kn-bremen.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H4OMy-0005rb-Q6 for qemu-devel@nongnu.org; Tue, 09 Jan 2007 16:18:59 -0500 From: Juergen Lock Date: Tue, 9 Jan 2007 21:47:40 +0100 Message-ID: <20070109204740.GA98620@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] weird slirp problems (dns lookups stopped working, and maybe more) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, freebsd-emulation@FreeBSD.org 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. Hmm? And when I patched slirp like this: Index: qemu/slirp/slirp.c @@ -130,6 +130,7 @@ void slirp_init(void) { // debug_init("/tmp/slirp.log", DEBUG_DEFAULT); + debug_init("/usr/tmp/slirp.log", DEBUG_DEFAULT); #ifdef _WIN32 { Index: qemu/slirp/udp.c @@ -104,6 +104,9 @@ */ ip = mtod(m, struct ip *); uh = (struct udphdr *)((caddr_t)ip + iphlen); +#if 1 + DEBUG_MISC((dfd, " udp_input(), ip_dst.s_addr=0x%x, uh_dport=%d\n", ntohl(ip->ip_dst.s_addr), ntohs(uh->uh_dport))); +#endif /* * Make mbuf data length reflect UDP length. it indeed shows slirp is getting the dest ip + port correctly and then sends them out wrong: ... m_get... m = 9bd7800 ip_input... m = 9bd7800 m_len = 56 udp_input... m = 9bd7800 iphlen = 20 udp_input(), ip_dst.s_addr=0xa000203, uh_dport=53 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... ... 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... m_get... m = 9bd7000 ip_input... m = 9bd7000 m_len = 74 udp_input... m = 9bd7000 iphlen = 20 udp_input(), ip_dst.s_addr=0xe00000fb, uh_dport=5353 sosendto... so = 9b39b80 m = 9bd7000 sendto()ing, addr.sin_port=5353, addr.sin_addr.s_addr=224.0.0.251 m_free... m = 9bd7800 ip_slowtimo... tcp_slowtimo... ip_slowtimo... tcp_slowtimo... And this is my try giving the real dns (which worked yesterday btw): m_get... m = 9bd7800 ip_input... m = 9bd7800 m_len = 56 udp_input... m = 9bd7800 iphlen = 20 udp_input(), ip_dst.s_addr=0xd9ed958e, uh_dport=53 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... ... I also got a report which stated that for him also tcp stopped working, while I still can do http:// and get the expected page, and as said I can also ssh (and scp) to the host (10.0.2.2). Soo, does anyone know slirp enough to have an idea whats going on here? The puzzling thing is I don't see recent slirp commits that could be relevant either... Thanx, Juergen