[Slirp] [Git][slirp/libslirp][master] 2 commits: Reject host forwarding to ipv6 "addr-any"

Samuel Thibault gitlab at gitlab.freedesktop.org
Tue Feb 16 20:42:04 UTC 2021



Samuel Thibault pushed to branch master at slirp / libslirp


Commits:
b55df476 by Doug Evans at 2021-02-16T12:27:37-08:00
Reject host forwarding to ipv6 "addr-any"

Libslirp currently only provides a stateless DHCPv6 server,
and thus can't do the "addr-any -> guest IP address" translation
that is done for ipv4. Until a stateful DHCPv6 server is available,
reject addr-any.

Signed-off-by: Doug Evans <dje at google.com>

- - - - -
26ae658a by Samuel Thibault at 2021-02-16T20:42:02+00:00
Merge branch 'reject-ipv6-addr-any' into 'master'

Reject host forwarding to ipv6 "addr-any"

See merge request slirp/libslirp!66
- - - - -


1 changed file:

- src/slirp.c


Changes:

=====================================
src/slirp.c
=====================================
@@ -1165,6 +1165,14 @@ int slirp_add_ipv6_hostfwd(Slirp *slirp, int is_udp,
                           struct in6_addr host_addr, int host_port,
                           struct in6_addr guest_addr, int guest_port)
 {
+    /*
+     * Libslirp currently only provides a stateless DHCPv6 server, thus we
+     * can't translate "addr-any" to the guest. Instead, for now, reject it.
+     */
+    if (in6_zero(&guest_addr)) {
+        return -1;
+    }
+
     if (is_udp) {
         if (!udp6_listen(slirp, host_addr, htons(host_port),
                          guest_addr, htons(guest_port), SS_HOSTFWD))



View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/5aa333e79b9892af9bf9621435d52cd058544d18...26ae658a83eeca16780cf5615c8247cbb151c3fa

-- 
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/5aa333e79b9892af9bf9621435d52cd058544d18...26ae658a83eeca16780cf5615c8247cbb151c3fa
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20210216/1b3897df/attachment.htm>


More information about the Slirp mailing list