[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of i
From: |
Samuel Thibault |
Subject: |
Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse |
Date: |
Mon, 1 Mar 2021 09:31:55 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Markus Armbruster, le lun. 01 mars 2021 09:15:41 +0100, a ecrit:
> Samuel Thibault <samuel.thibault@gnu.org> writes:
> > 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
Yes and that's also what ssh documents, but in ssh the brackets happen
to also work for an IPv4 address.
Samuel