qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions


From: Samuel Thibault
Subject: Re: [Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions
Date: Wed, 17 Feb 2016 10:30:39 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]