[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
- [Qemu-devel] [PATCHv7 2/9] slirp: Adding ICMPv6 error sending, (continued)
- [Qemu-devel] [PATCHv7 2/9] slirp: Adding ICMPv6 error sending, Samuel Thibault, 2016/02/14
- [Qemu-devel] [PATCHv7 5/9] slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff, Samuel Thibault, 2016/02/14
- [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration, Samuel Thibault, 2016/02/14
- [Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union, Samuel Thibault, 2016/02/14
- [Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions, Samuel Thibault, 2016/02/14
- [Qemu-devel] [PATCHv7 9/9] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses, Samuel Thibault, 2016/02/14
- [Qemu-devel] [PATCHv7 8/9] slirp: Adding IPv6 address for DNS relay, Samuel Thibault, 2016/02/14
- [Qemu-devel] [PATCH] slirp: Add IPv6 support to the TFTP code, Thomas Huth, 2016/02/16