[Qemu-devel] [PATCH RFC 0/4] slirp: support hostfwd for ipv6 addresses

Maxim Samoylov posted 4 patches 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1540512223-21199-1-git-send-email-max7255@yandex-team.ru
Test docker-clang@ubuntu passed
Test checkpatch passed
Test asan passed
Test docker-mingw@fedora failed
Test docker-quick@centos7 passed
hmp-commands.hx     |  31 ++++++++
include/net/slirp.h |   2 +
net/slirp.c         | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++
qapi/net.json       |   3 +-
slirp/libslirp.h    |   6 ++
slirp/slirp.c       |  43 +++++++++++
slirp/socket.c      |  73 ++++++++++++++++++
slirp/socket.h      |   2 +
slirp/udp.c         |  48 ++++++++++++
slirp/udp.h         |   2 +
10 files changed, 423 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH RFC 0/4] slirp: support hostfwd for ipv6 addresses
Posted by Maxim Samoylov 7 years ago
The following patch implements ipv6 host port forwarding support
for qemu slirp net subsystem.

The slirp itself supports ipv6 communication, but
hostfwd currently does not allow listening on and forwarding
ports for ipv6 addresses.

This should be useful, when host works in v6-capable environment
and guests should be accessible there.

Turns out the only thing should be done is to properly parse 
ipv6 addresses and pass them down to listening socket create logic.

The proposed option ipv6-hostfwd syntax is the same as for the hostfwd option,
but one should enclose their ipv6 addresses into square brackets, e.g.:

ipv6-hostfwd=tcp::7255-[fec0::5054:ff:fe12:3456]:80

The guest ipv6 address intended to be specified explicitly,
because there is no dhcpv6 server in slirp.


Maxim Samoylov (4):
  slirp: add helper for tcp6 socket creation
  slirp: add helper for udp6 socket creation
  slirp: add helpers for ipv6 hostfwd manipulation
  net/slirp: add ipv6-hostfwd option for user netdev type

 hmp-commands.hx     |  31 ++++++++
 include/net/slirp.h |   2 +
 net/slirp.c         | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 qapi/net.json       |   3 +-
 slirp/libslirp.h    |   6 ++
 slirp/slirp.c       |  43 +++++++++++
 slirp/socket.c      |  73 ++++++++++++++++++
 slirp/socket.h      |   2 +
 slirp/udp.c         |  48 ++++++++++++
 slirp/udp.h         |   2 +
 10 files changed, 423 insertions(+), 1 deletion(-)

-- 
2.7.4