qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@gnu.org>
To: Doug Evans <dje@google.com>
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse
Date: Mon, 1 Mar 2021 22:05:20 +0100	[thread overview]
Message-ID: <20210301210520.rfcgq6kp6qr66pzr@begin> (raw)
In-Reply-To: <20210301162747.dmsaqzni6mrmkx4a@begin>

Samuel Thibault, le lun. 01 mars 2021 17:27:47 +0100, a ecrit:
> Doug Evans, le lun. 01 mars 2021 08:23:03 -0800, a ecrit:
> > On Sun, Feb 28, 2021 at 1:40 PM Samuel Thibault <[1]samuel.thibault@gnu.org>
> > wrote:
> > 
> >     [...]
> >     > Note that one issue I am leaving for later (i.e., I don't want to drag
> >     this
> >     > patch series out to include it), is whether and how to support
> >     ipv4-host->
> >     > ipv6-guest forwarding and vice versa. Can libslirp support this?
> > 
> >     That would be feasible yes: since the data flow is completely rebuilt
> >     between the host and the guest, there is no remnant of the IP version.
> >     It was simpler to have e.g. udp_listen and udp6_listen separate to keep
> >     uint32_t / in6_addr parameters, but there is no strict reason for this:
> >     the haddr is only passed to the bind() call, and the laddr is only
> >     recorded in the so. Put another way, a refactoring patch could be to
> >     just hand udp_listen two sockaddrs, and it will just work fine. We'd
> >     then introduce a slirp_add_hostfwd that takes two sockaddr instead of
> >     host/port.
> > 
> > 
> > 
> > I guess I'm not familiar enough with this code.
> > Help me understand how passing two addresses to udp_listen is simpler.
> > That feels confusing from an API viewpoint.
> 
> ? udp_listen already takes two addresses + two ports. I just mean
> replacing that with two sockaddr, which contains both, but also contains
> the address family. I submitted this to 
> 
> https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/74

And the public API to 
https://gitlab.freedesktop.org/slirp/libslirp/-/merge_requests/75

Ideally we'd then just drop the ipv6-only public API.

Samuel


  reply	other threads:[~2021-03-01 21:06 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 20:15 [PATCH v4 0/4] Add support for ipv6 host forwarding Doug Evans via
2021-02-18 20:15 ` [PATCH v4 1/4] slirp: Advance libslirp submodule to add ipv6 host-forward support Doug Evans via
2021-02-19  9:38   ` Daniel P. Berrangé
2021-02-19 21:43     ` Doug Evans
2021-02-18 20:15 ` [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse Doug Evans via
2021-02-19 10:00   ` Daniel P. Berrangé
2021-02-19 22:17     ` Doug Evans
2021-02-22  9:39       ` Daniel P. Berrangé
2021-02-23 18:23         ` Doug Evans
2021-02-28 21:39         ` Samuel Thibault
2021-02-28 22:20           ` Samuel Thibault
2021-03-01  8:15           ` Markus Armbruster
2021-03-01  8:31             ` Samuel Thibault
2021-03-01 16:07           ` Doug Evans
2021-03-01 16:26             ` Samuel Thibault
2021-03-01 20:39               ` Samuel Thibault
2021-03-01 16:23           ` Doug Evans
2021-03-01 16:27             ` Samuel Thibault
2021-03-01 21:05               ` Samuel Thibault [this message]
2021-03-03 18:06           ` Doug Evans
2021-03-03 18:11             ` Daniel P. Berrangé
2021-03-05 21:28               ` Samuel Thibault
2021-03-05 21:51                 ` Doug Evans
2021-03-05 22:21                   ` Doug Evans
2021-03-06  0:05                 ` Doug Evans
2021-03-06  0:10                   ` Samuel Thibault
2021-03-06  1:00                     ` Doug Evans
2021-03-06 19:29                       ` Samuel Thibault
2021-03-14 19:52                         ` Doug Evans
2021-02-18 20:15 ` [PATCH v4 3/4] net/slirp.c: Refactor address parsing Doug Evans via
2021-02-18 20:15 ` [PATCH v4 4/4] net: Extend host forwarding to support IPv6 Doug Evans via
2021-02-18 20:34 ` [PATCH v4 0/4] Add support for ipv6 host forwarding no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210301210520.rfcgq6kp6qr66pzr@begin \
    --to=samuel.thibault@gnu.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dje@google.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).