qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Samuel Thibault <samuel.thibault@gnu.org>
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Doug Evans" <dje@google.com>
Subject: Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse
Date: Mon, 01 Mar 2021 09:15:41 +0100	[thread overview]
Message-ID: <87lfb7l26q.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20210228213957.xkc4cceh5o6rgd5n@begin> (Samuel Thibault's message of "Sun, 28 Feb 2021 22:39:57 +0100")

Samuel Thibault <samuel.thibault@gnu.org> writes:

> Hello,
>
> Daniel P. Berrangé, le lun. 22 févr. 2021 09:39:41 +0000, a ecrit:
>> In general callers shouldn't care about which format was parsed. The use
>> of [] is just a mechanism to reliably separate the port from the address.
>> Once you have the address part getaddrinfo() will reliably parse the
>> address into a sockaddr struct on its own.
>
> Agreed.
>
>> The is_v6 flag is only needed
>> for the legacy compat needs in slirp, even that is only if we want to 
>> have strict equivalence with historical behaviour, as opposed to changing
>> empty string to mean to listen on both IPv4+6 concurrently..
>
> I would say that empty address meaning ipv4+6 looks better to me.
>
> Doug Evans, le lun. 22 févr. 2021 09:55:09 -0800, a ecrit:
>> Hi guys. I think before I submit yet another patchset in this series I need
>> someone with authority to define the user API for ipv6 host forwarding.
>> Since the hostfwd syntax is parsed in net/slirp.c, Samuel I think that means
>> you (based on what I'm reading in MAINTAINERS).
>
> Well, I'm not maintainer of the user API actually. That'd rather be
> Markus Armbruster, now Cc-ed, who devises the command-line options,
> QAPI, etc.

I rarely devise, I just try to keep things sane by reviewing and
advising, with the help of others.

>> Based on what Maxim originally wrote I was going with addresses wrapped in []
>> mean ipv6, but Daniel does not want that.
>
> Specifying [127.0.0.1] would be odd, but for instance 
>
> ssh localhost -D '[127.0.0.1]':23456
>
> happens to listen on 127.0.0.1. So I would say that common practice
> really is that [] only matters for syntax, and not semantic.

I believe common syntactic practice is to use [brackets] only around
numeric IPv6 addresses.  E.g. socat(1):

       IP address
              An IPv4 address in numbers-and-dots notation, an IPv6 address in
              hex notation enclosed in brackets, or a hostname  that  resolves
              to an IPv4 or an IPv6 address.
              Examples: 127.0.0.1, [::1], www.dest-unreach.org, dns1

[...]



  parent reply	other threads:[~2021-03-01  8:16 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 [this message]
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
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=87lfb7l26q.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dje@google.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@gnu.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).