From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Doug Evans <dje@google.com>
Cc: "Samuel Thibault" <samuel.thibault@ens-lyon.org>,
"Marc-André Lureau" <marcandre.lureau@gmail.com>,
QEMU <qemu-devel@nongnu.org>
Subject: Re: RFC: IPv6 hostfwd command line syntax [was Re: [PATCH v6 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse]
Date: Wed, 26 May 2021 14:57:21 +0100 [thread overview]
Message-ID: <YK5TweOui5bwJ6vl@redhat.com> (raw)
In-Reply-To: <CADPb22TW5GkwcF_08R1KBr+NKBGLOHBwFqHPOJKVgiDa6w2VKA@mail.gmail.com>
On Tue, May 25, 2021 at 12:37:21PM -0700, Doug Evans wrote:
> Hi.
>
> I want to confirm the command line syntax y'all want for ipv6 host
> forwarding.
>
> IIUC, the command line syntax is required to be consistent with the use of
> "ipv6=on|off" elsewhere.
> Can you confirm that's correct?
>
> If so, how does one apply "ipv6=on" to the "::60022-:22" hostfwd spec in
> the following example:
>
> $ qemu-system-x86_64 [...] --nic user,id=n1,model=e1000,hostfwd=::60022-:22
>
> ?
Probably easier if we start from the HMP hostfwd_add command which takes
hostfwd_add ::60022-:22
With that, adding the flags is obvious
hostfwd_add ::60022-:22,ipv6=on|off,ipv4=on|off
IIUC, that can be handled in the slirp_hostfwd() method impl.
The question is then how this works on the CLI. IIUC ,the "hostfwd=XXX"
ARG value is passed to slirp_hostfwd() eventually, so the change for
the HMP parsing will "just work".
The complication is that the comma is ambiguous between the --net arg
parsing, and the hostfwd parsing. So you would end up having to escape
the commas (ie replace , with ,,):
--nic user,id=n1,model=e1000,hostfwd=::60022-:22,,ipv6=on,,ipv4=on
If you forget to escape the commas, then the flag ends up applying
to the --nic instead, where ipv4/ipv6 are indeed value for other
reasons.
This kind of sucks, but that's where we are with the old fashioned
design of --nic parsing
Not sure if someone else has better ideas here ?
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2021-05-26 13:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 3:39 [PATCH v6 0/4] Add support for ipv6 host forwarding Doug Evans
2021-04-15 3:39 ` [PATCH v6 1/4] slirp: Advance libslirp submodule to add ipv6 host-forward support Doug Evans
2021-05-07 15:23 ` Marc-André Lureau
2021-05-07 15:46 ` Doug Evans
2021-05-12 16:42 ` Doug Evans
2021-05-12 17:18 ` Marc-André Lureau
2021-05-12 19:50 ` Doug Evans
2021-05-12 20:14 ` Marc-André Lureau
2021-04-15 3:39 ` [PATCH v6 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse Doug Evans
2021-05-07 15:23 ` Marc-André Lureau
2021-05-25 19:37 ` RFC: IPv6 hostfwd command line syntax [was Re: [PATCH v6 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse] Doug Evans
2021-05-26 13:57 ` Daniel P. Berrangé [this message]
2021-05-26 15:26 ` Doug Evans
2021-05-26 15:29 ` Daniel P. Berrangé
2021-04-15 3:39 ` [PATCH v6 3/4] net/slirp.c: Refactor address parsing Doug Evans
2021-04-15 15:36 ` Doug Evans
2021-05-07 15:29 ` Marc-André Lureau
2021-04-15 3:39 ` [PATCH v6 4/4] net: Extend host forwarding to support IPv6 Doug Evans
2021-04-29 3:37 ` [PATCH v6 0/4] Add support for ipv6 host forwarding Doug Evans
2021-05-05 15:21 ` Doug Evans
2021-05-05 16:13 ` Philippe Mathieu-Daudé
2021-05-05 16:15 ` Philippe Mathieu-Daudé
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=YK5TweOui5bwJ6vl@redhat.com \
--to=berrange@redhat.com \
--cc=dje@google.com \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@ens-lyon.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).