From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVyRc-0007wz-Jr for qemu-devel@nongnu.org; Wed, 17 Feb 2016 04:30:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVyRX-00042D-Ak for qemu-devel@nongnu.org; Wed, 17 Feb 2016 04:30:48 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:12679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVyRW-00041d-17 for qemu-devel@nongnu.org; Wed, 17 Feb 2016 04:30:43 -0500 Date: Wed, 17 Feb 2016 10:30:39 +0100 From: Samuel Thibault Message-ID: <20160217093039.GA3716@var.bordeaux.inria.fr> References: <8013f08a2724d618b8dcb98e35fbe68bd597df42.1455471945.git.samuel.thibault@ens-lyon.org> <56C43ADC.3060406@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56C43ADC.3060406@redhat.com> Subject: Re: [Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions 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 , Guillaume Subiron Thomas Huth, on Wed 17 Feb 2016 10:18:20 +0100, wrote: > > @@ -204,6 +218,20 @@ tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf *m, > > (void) ip_output((struct socket *)0, m); > > break; > > > > + case AF_INET6: > > + m->m_data += sizeof(struct tcpiphdr) - sizeof(struct tcphdr) > > + - sizeof(struct ip6); > > + m->m_len -= sizeof(struct tcpiphdr) - sizeof(struct tcphdr) > > + - sizeof(struct ip6); > > + ip6 = mtod(m, struct ip6 *); > > + ip6->ip_pl = tlen; > > + ip6->ip_dst = tcpiph_save.ti_dst6; > > + ip6->ip_src = tcpiph_save.ti_src6; > > + ip6->ip_nh = tcpiph_save.ti_nh6; > > + > > + (void) ip6_output((struct socket *)0, m, 0); > > Is that "(void)" really necessary here? Also, I think you could simply > use "NULL" instead of "(struct socket *)0". Indeed. That was just for coherency with the ip_output call above. I've now updated that line too. Samuel