[PATCH v5 0/5] Add support for ipv6 host forwarding

Doug Evans via posted 5 patches 3 years, 2 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210220001322.1311139-1-dje@google.com
Maintainers: "Philippe Mathieu-Daudé" <philmd@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Jason Wang <jasowang@redhat.com>, Samuel Thibault <samuel.thibault@ens-lyon.org>, Gerd Hoffmann <kraxel@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Cleber Rosa <crosa@redhat.com>
There is a newer version of this series
hmp-commands.hx             |  15 +++
include/qemu/sockets.h      |   3 +
net/slirp.c                 | 196 ++++++++++++++++++++++++------------
slirp                       |   2 +-
tests/acceptance/hostfwd.py | 174 ++++++++++++++++++++++++++++++++
util/qemu-sockets.c         |  84 ++++++++++++----
6 files changed, 390 insertions(+), 84 deletions(-)
create mode 100644 tests/acceptance/hostfwd.py
[PATCH v5 0/5] Add support for ipv6 host forwarding
Posted by Doug Evans via 3 years, 2 months ago
This patchset takes the original patch from Maxim,
https://www.mail-archive.com/qemu-devel@nongnu.org/msg569573.html
and updates it.

Option hostfwd is extended to support ipv6 addresses.
Commands hostfwd_add, hostfwd_remove are extended as well.

The libslirp part of the patch has been committed upstream,
and is now in qemu. See patch 1/5.

Changes from v4:

1/5 slirp: Advance libslirp submodule to add ipv6 host-forward support
NOTE TO REVIEWERS: I need some hand-holding to know what The Right
way to submit this particular patch is.

- no change

2/5 util/qemu-sockets.c: Split host:port parsing out of inet_parse

- move recognition of "[]:port" to separate patch
- allow passing NULL for ip_v6
- fix some formatting issues

3/5 inet_parse_host_and_addr: Recognize []:port (empty ipv6 address)

- new in this patchset revision

4/5 net/slirp.c: Refactor address parsing

- was 3/4 in v4
- fix some formatting issues

5/5 net: Extend host forwarding to support IPv6

- was 4/4 in v4
- fix some formatting issues

Changes from v3:

1/4 slirp: Advance libslirp submodule to add ipv6 host-forward support

- pick up latest libslirp patch to reject ipv6 addr-any for guest address
  - libslirp currently only provides a stateless DHCPv6 server, which means
    it can't know in advance what the guest's IP address is, and thus
    cannot do the "addr-any -> guest ip address" translation that is done
    for ipv4

2/4 util/qemu-sockets.c: Split host:port parsing out of inet_parse

- this patch is new in v4
  - provides new utility: inet_parse_host_and_port, updates inet_parse
    to use it

3/4 net/slirp.c: Refactor address parsing

- this patch renamed from 2/3 to 3/4
- call inet_parse_host_and_port from util/qemu-sockets.c
- added tests/acceptance/hostfwd.py

4/4 net: Extend host forwarding to support IPv6

- this patch renamed from 3/3 to 4/4
- ipv6 support added to existing hostfwd option, commands
  - instead of creating new ipv6 option, commands
- added tests to tests/acceptance/hostfwd.py

Changes from v2:
- split out libslirp commit
- clarify spelling of ipv6 addresses in docs
- tighten parsing of ipv6 addresses

Change from v1:
- libslirp part is now upstream
- net/slirp.c changes split into two pieces (refactor, add ipv6)
- added docs

Doug Evans (5):
  slirp: Advance libslirp submodule to add ipv6 host-forward support
  util/qemu-sockets.c: Split host:port parsing out of inet_parse
  inet_parse_host_and_addr: Recognize []:port (empty ipv6 address)
  net/slirp.c: Refactor address parsing
  net: Extend host forwarding to support IPv6

 hmp-commands.hx             |  15 +++
 include/qemu/sockets.h      |   3 +
 net/slirp.c                 | 196 ++++++++++++++++++++++++------------
 slirp                       |   2 +-
 tests/acceptance/hostfwd.py | 174 ++++++++++++++++++++++++++++++++
 util/qemu-sockets.c         |  84 ++++++++++++----
 6 files changed, 390 insertions(+), 84 deletions(-)
 create mode 100644 tests/acceptance/hostfwd.py

-- 
2.30.0.617.g56c4b15f3c-goog


Re: [PATCH v5 0/5] Add support for ipv6 host forwarding
Posted by no-reply@patchew.org 3 years, 2 months ago
Patchew URL: https://patchew.org/QEMU/20210220001322.1311139-1-dje@google.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210220001322.1311139-1-dje@google.com
Subject: [PATCH v5 0/5] Add support for ipv6 host forwarding

=== 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/20210220001322.1311139-1-dje@google.com -> patchew/20210220001322.1311139-1-dje@google.com
Switched to a new branch 'test'
9d33831 net: Extend host forwarding to support IPv6
2b79933 net/slirp.c: Refactor address parsing
5090008 inet_parse_host_and_addr: Recognize []:port (empty ipv6 address)
5c2dcad util/qemu-sockets.c: Split host:port parsing out of inet_parse
79b77c4 slirp: Advance libslirp submodule to add ipv6 host-forward support

=== OUTPUT BEGIN ===
1/5 Checking commit 79b77c431b30 (slirp: Advance libslirp submodule to add ipv6 host-forward support)
ERROR: Author email address is mangled by the mailing list
#2: 
Author: Doug Evans via <qemu-devel@nongnu.org>

total: 1 errors, 0 warnings, 2 lines checked

Patch 1/5 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

2/5 Checking commit 5c2dcad2990c (util/qemu-sockets.c: Split host:port parsing out of inet_parse)
ERROR: Author email address is mangled by the mailing list
#2: 
Author: Doug Evans via <qemu-devel@nongnu.org>

total: 1 errors, 0 warnings, 117 lines checked

Patch 2/5 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

3/5 Checking commit 509000883fbd (inet_parse_host_and_addr: Recognize []:port (empty ipv6 address))
ERROR: Author email address is mangled by the mailing list
#2: 
Author: Doug Evans via <qemu-devel@nongnu.org>

total: 1 errors, 0 warnings, 20 lines checked

Patch 3/5 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/5 Checking commit 2b7993354518 (net/slirp.c: Refactor address parsing)
ERROR: Author email address is mangled by the mailing list
#2: 
Author: Doug Evans via <qemu-devel@nongnu.org>

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#248: 
new file mode 100644

WARNING: line over 80 characters
#334: FILE: tests/acceptance/hostfwd.py:82:
+                          "host address: error parsing port in address ':')\r\n")

total: 1 errors, 2 warnings, 315 lines checked

Patch 4/5 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/5 Checking commit 9d3383170e32 (net: Extend host forwarding to support IPv6)
ERROR: Author email address is mangled by the mailing list
#2: 
Author: Doug Evans via <qemu-devel@nongnu.org>

WARNING: line over 80 characters
#225: FILE: tests/acceptance/hostfwd.py:101:
+        self.assertEquals(self.hmc('hostfwd_add vnet tcp:[::1]:65022-[fe80::1]:22'),

WARNING: line over 80 characters
#228: FILE: tests/acceptance/hostfwd.py:104:
+                          'host forwarding rule for tcp:[::1]:65022 removed\r\n')

WARNING: line over 80 characters
#236: FILE: tests/acceptance/hostfwd.py:112:
+                          'host forwarding rule for udp:[::1]:65042 removed\r\n')

WARNING: line over 80 characters
#254: FILE: tests/acceptance/hostfwd.py:130:
+                          'host forwarding rule for udp:[::1]:65042 removed\r\n')

WARNING: line over 80 characters
#256: FILE: tests/acceptance/hostfwd.py:132:
+                          'host forwarding rule for udp:[::1]:65042 not found\r\n')

WARNING: line over 80 characters
#266: FILE: tests/acceptance/hostfwd.py:142:
+                          "(For host address: error parsing IPv6 address '[::1')\r\n")

WARNING: line over 80 characters
#276: FILE: tests/acceptance/hostfwd.py:152:
+                          "(For host address: error parsing IPv6 address '[::1]')\r\n")

WARNING: line over 80 characters
#279: FILE: tests/acceptance/hostfwd.py:155:
+                          "(For guest address: error parsing IPv6 address '[foo]')\r\n")

WARNING: line over 80 characters
#285: FILE: tests/acceptance/hostfwd.py:161:
+                          "':[::1]:66-[fe80::1]:-1' (For guest address: Bad port)\r\n")

WARNING: line over 80 characters
#288: FILE: tests/acceptance/hostfwd.py:164:
+                          "':[::1]:66-[fe80::1]:66666' (For guest address: Bad port)\r\n")

WARNING: line over 80 characters
#291: FILE: tests/acceptance/hostfwd.py:167:
+                          "':[::1]:66-[fe80::1]:0' (For guest address: Bad port)\r\n")

total: 1 errors, 11 warnings, 260 lines checked

Patch 5/5 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/20210220001322.1311139-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