From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTFbq-0001JQ-OD for qemu-devel@nongnu.org; Tue, 09 Feb 2016 16:14:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTFbn-0001S3-HB for qemu-devel@nongnu.org; Tue, 09 Feb 2016 16:14:06 -0500 Received: from sonata.ens-lyon.org ([140.77.166.138]:36304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTFbn-0001Rz-AV for qemu-devel@nongnu.org; Tue, 09 Feb 2016 16:14:03 -0500 Date: Tue, 9 Feb 2016 22:13:59 +0100 From: Samuel Thibault Message-ID: <20160209211359.GK2673@var.home> References: <56BA4FA2.1070809@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56BA4FA2.1070809@redhat.com> Subject: Re: [Qemu-devel] [PATCHv7 3/9] slirp: Adding IPv6 UDP support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: zhanghailiang , Li Zhijian , Stefan Hajnoczi , Jason Wang , qemu-devel@nongnu.org, Vasiliy Tolstov , Dave Gilbert , Gonglei , Jan Kiszka , Huangpeng , Yang Hongyang , Guillaume Subiron Thomas Huth, on Tue 09 Feb 2016 21:44:18 +0100, wrote: > > + case AF_INET6: > > + udp6_output(so, m, (struct sockaddr_in6 *) &saddr, > > + (struct sockaddr_in6 *) &daddr); > > + break; > > default: > > + g_assert_not_reached(); > > Could this be triggered by the guest? No, here we are in sorecvfrom, which only reads ipv4 or ipv6 packets from the udp socket. > > + so->so_ffamily = AF_INET6; > > + so->so_faddr6 = ip->ip_dst; /* XXX */ > > + so->so_fport6 = uh->uh_dport; /* XXX */ > > Why use the XXXs here? Some additional words in the comments would be > nice... That's a copy/paste from the UDPv4 code. I don't know why they are there. Samuel