* [PATCH] inet_parse: Clarify IPv6 comment and error message
@ 2021-03-08 0:29 Doug Evans via
2021-03-08 0:33 ` no-reply
2021-03-08 11:31 ` Daniel P. Berrangé
0 siblings, 2 replies; 6+ messages in thread
From: Doug Evans via @ 2021-03-08 0:29 UTC (permalink / raw)
To: qemu-devel, Samuel Thibault, Daniel P. Berrangé; +Cc: Doug Evans
Wrapping an IP address in square brackets does not necessarily
mean the address is an IPv6 address. The wrapping is just an aid
to parsing since IPv6 addresses have colons, but does not provide
semantic information.
E.g., [127.0.0.1] is a valid way to write 127.0.0.1.
Signed-off-by: Doug Evans <dje@google.com>
---
util/qemu-sockets.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 8af0278f15..0c41d372c0 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -635,9 +635,12 @@ int inet_parse(InetSocketAddress *addr, const char *str, Error **errp)
return -1;
}
} else if (str[0] == '[') {
- /* IPv6 addr */
+ /*
+ * Probably, but not necessarily, an IPv6 addr.
+ * Note that [127.0.0.1] is also valid.
+ */
if (sscanf(str, "[%64[^]]]:%32[^,]%n", host, port, &pos) != 2) {
- error_setg(errp, "error parsing IPv6 address '%s'", str);
+ error_setg(errp, "error parsing address '%s'", str);
return -1;
}
} else {
--
2.30.1.766.gb4fecdf3b7-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] inet_parse: Clarify IPv6 comment and error message
2021-03-08 0:29 [PATCH] inet_parse: Clarify IPv6 comment and error message Doug Evans via
@ 2021-03-08 0:33 ` no-reply
2021-03-08 1:31 ` Doug Evans
2021-03-08 11:31 ` Daniel P. Berrangé
1 sibling, 1 reply; 6+ messages in thread
From: no-reply @ 2021-03-08 0:33 UTC (permalink / raw)
To: qemu-devel; +Cc: samuel.thibault, berrange, qemu-devel, dje
Patchew URL: https://patchew.org/QEMU/20210308002928.3385275-1-dje@google.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20210308002928.3385275-1-dje@google.com
Subject: [PATCH] inet_parse: Clarify IPv6 comment and error message
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/20210308002928.3385275-1-dje@google.com -> patchew/20210308002928.3385275-1-dje@google.com
Switched to a new branch 'test'
6e42a49 inet_parse: Clarify IPv6 comment and error message
=== OUTPUT BEGIN ===
ERROR: Author email address is mangled by the mailing list
#2:
Author: Doug Evans via <qemu-devel@nongnu.org>
total: 1 errors, 0 warnings, 14 lines checked
Commit 6e42a4981895 (inet_parse: Clarify IPv6 comment and error message) has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/20210308002928.3385275-1-dje@google.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] inet_parse: Clarify IPv6 comment and error message
2021-03-08 0:33 ` no-reply
@ 2021-03-08 1:31 ` Doug Evans
2021-03-08 11:30 ` Daniel P. Berrangé
0 siblings, 1 reply; 6+ messages in thread
From: Doug Evans @ 2021-03-08 1:31 UTC (permalink / raw)
To: QEMU Developers; +Cc: Samuel Thibault, Daniel P. Berrangé
[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]
Not sure how this "Author email address is mangled" happened.
$ git format-patch -o patches/error-parsing-ipv6 -1
$ git send-email --to='qemu-devel@nongnu.org,Samuel Thibault <
samuel.thibault@ens-lyon.org>,"Daniel P. Berrangé" <berrange@redhat.com>' \
--smtp-server=foo
patches/error-parsing-ipv6/0001-inet_parse-Clarify-IPv6-comment-and-error-message.patch
It's possible my smtp-server arg munged things incorrectly, but I've done
the identical thing for previous patches and not seen this for at least
some of them.
Sigh.
On Sun, Mar 7, 2021 at 4:33 PM <no-reply@patchew.org> wrote:
> Patchew URL:
> https://patchew.org/QEMU/20210308002928.3385275-1-dje@google.com/
>
>
>
> Hi,
>
> This series seems to have some coding style problems. See output below for
> more information:
>
> Type: series
> Message-id: 20210308002928.3385275-1-dje@google.com
> Subject: [PATCH] inet_parse: Clarify IPv6 comment and error message
>
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> git rev-parse base > /dev/null || exit 0
> git config --local diff.renamelimit 0
> git config --local diff.renames True
> git config --local diff.algorithm histogram
> ./scripts/checkpatch.pl --mailback base..
> === TEST SCRIPT END ===
>
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> From https://github.com/patchew-project/qemu
> * [new tag] patchew/20210308002928.3385275-1-dje@google.com ->
> patchew/20210308002928.3385275-1-dje@google.com
> Switched to a new branch 'test'
> 6e42a49 inet_parse: Clarify IPv6 comment and error message
>
> === OUTPUT BEGIN ===
> ERROR: Author email address is mangled by the mailing list
> #2:
> Author: Doug Evans via <qemu-devel@nongnu.org>
>
> total: 1 errors, 0 warnings, 14 lines checked
>
> Commit 6e42a4981895 (inet_parse: Clarify IPv6 comment and error message)
> has style problems, please review. If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
> === OUTPUT END ===
>
> Test command exited with code: 1
>
>
> The full log is available at
>
> http://patchew.org/logs/20210308002928.3385275-1-dje@google.com/testing.checkpatch/?type=message
> .
> ---
> Email generated automatically by Patchew [https://patchew.org/].
> Please send your feedback to patchew-devel@redhat.com
[-- Attachment #2: Type: text/html, Size: 4163 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] inet_parse: Clarify IPv6 comment and error message
2021-03-08 1:31 ` Doug Evans
@ 2021-03-08 11:30 ` Daniel P. Berrangé
2021-03-08 16:05 ` Eric Blake
0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrangé @ 2021-03-08 11:30 UTC (permalink / raw)
To: Doug Evans; +Cc: Samuel Thibault, QEMU Developers
On Sun, Mar 07, 2021 at 05:31:24PM -0800, Doug Evans wrote:
> Not sure how this "Author email address is mangled" happened.
>
> $ git format-patch -o patches/error-parsing-ipv6 -1
> $ git send-email --to='qemu-devel@nongnu.org,Samuel Thibault <
> samuel.thibault@ens-lyon.org>,"Daniel P. Berrangé" <berrange@redhat.com>' \
> --smtp-server=foo
> patches/error-parsing-ipv6/0001-inet_parse-Clarify-IPv6-comment-and-error-message.patch
>
> It's possible my smtp-server arg munged things incorrectly, but I've done
> the identical thing for previous patches and not seen this for at least
> some of them.
> Sigh.
The 'via <qemu-devel@nongnu.org>' mangling is something that gnu.org
mailman is configured to do. It used to do this in many scenarios, but
supposedly it now only mangles when the sender has a bad DKIM signature
and their domain has strict DMARC policies:
https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg00416.html
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 :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] inet_parse: Clarify IPv6 comment and error message
2021-03-08 11:30 ` Daniel P. Berrangé
@ 2021-03-08 16:05 ` Eric Blake
0 siblings, 0 replies; 6+ messages in thread
From: Eric Blake @ 2021-03-08 16:05 UTC (permalink / raw)
To: Daniel P. Berrangé, Doug Evans; +Cc: Samuel Thibault, QEMU Developers
On 3/8/21 5:30 AM, Daniel P. Berrangé wrote:
> On Sun, Mar 07, 2021 at 05:31:24PM -0800, Doug Evans wrote:
>> Not sure how this "Author email address is mangled" happened.
>>
>> $ git format-patch -o patches/error-parsing-ipv6 -1
>> $ git send-email --to='qemu-devel@nongnu.org,Samuel Thibault <
>> samuel.thibault@ens-lyon.org>,"Daniel P. Berrangé" <berrange@redhat.com>' \
>> --smtp-server=foo
>> patches/error-parsing-ipv6/0001-inet_parse-Clarify-IPv6-comment-and-error-message.patch
>>
>> It's possible my smtp-server arg munged things incorrectly, but I've done
>> the identical thing for previous patches and not seen this for at least
>> some of them.
>> Sigh.
>
> The 'via <qemu-devel@nongnu.org>' mangling is something that gnu.org
> mailman is configured to do. It used to do this in many scenarios, but
> supposedly it now only mangles when the sender has a bad DKIM signature
> and their domain has strict DMARC policies:
>
> https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg00416.html
And the solution to avoid triggering the check failure is to include
'From: you <real@address>' as the first line of the body (which will
then override whatever header mangling the list inflicted on your
message). There are supposedly ways to configure git to do this
automatically for you as part of 'git send-email', but as I don't suffer
from the problem, I'm not sure off-hand what those steps are (git config
format.from ?)
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] inet_parse: Clarify IPv6 comment and error message
2021-03-08 0:29 [PATCH] inet_parse: Clarify IPv6 comment and error message Doug Evans via
2021-03-08 0:33 ` no-reply
@ 2021-03-08 11:31 ` Daniel P. Berrangé
1 sibling, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2021-03-08 11:31 UTC (permalink / raw)
To: Doug Evans; +Cc: Samuel Thibault, qemu-devel
On Sun, Mar 07, 2021 at 04:29:28PM -0800, Doug Evans via wrote:
> Wrapping an IP address in square brackets does not necessarily
> mean the address is an IPv6 address. The wrapping is just an aid
> to parsing since IPv6 addresses have colons, but does not provide
> semantic information.
> E.g., [127.0.0.1] is a valid way to write 127.0.0.1.
>
> Signed-off-by: Doug Evans <dje@google.com>
> ---
> util/qemu-sockets.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-08 16:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-08 0:29 [PATCH] inet_parse: Clarify IPv6 comment and error message Doug Evans via
2021-03-08 0:33 ` no-reply
2021-03-08 1:31 ` Doug Evans
2021-03-08 11:30 ` Daniel P. Berrangé
2021-03-08 16:05 ` Eric Blake
2021-03-08 11:31 ` Daniel P. Berrangé
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).