Age | Commit message (Collapse) | Author | Files | Lines |
|
Fix typos in comments
See merge request slirp/libslirp!88
|
|
Found with the "codespell" utility.
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
|
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
Release v4.5.0
Closes #40
See merge request slirp/libslirp!87
|
|
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
ndp_table: For unspecified address, return broadcast ethernet address
See merge request slirp/libslirp!86
|
|
We cannot let the guest crash libslirp by making it answer a tftp
request such as shown in
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33873
https://gitlab.com/qemu-project/qemu/-/issues/111
unspecified addresses may also be used for non-configured devices, so it
makes sense to use the broadcast ethernet address in that case, just
like we do with IPv4.
|
|
Remove alloca() call in get_dns_addr_resolv_conf()
See merge request slirp/libslirp!84
|
|
The ALLOCA(3) man-page mentions its "use is discouraged".
For now get_dns_addr_resolv_conf() is called with pointer to
a in_addr/in6_addr structure, and its size. Declare a union
of these structures on the stack, able to hold both of them.
This allows us to remove the alloca() call, keeping the buffer
on the stack.
Add an assertion in the unlikely case another inet address
is handled by this function.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210507133212.1952121-1-philmd@redhat.com>
|
|
Perform lazy guest address resolution for IPv6
See merge request slirp/libslirp!81
|
|
Previously QEMU rejected IPv6 host-forward attempts that had an
unspecified guest address. This is because for IPv6 the guest's
IP address isn't necessarily known ahead of time: Libslirp only
provides a "stateless" DHCPv6 server, which if the macaddr is
random then the IPv6 address is random too.
This patch changes this to do the address resolution lazily, in the
hopes that the guest's IPv6 address is known at the time the user
wants to connect to the guest. The request can still fail if the
guest doesn't have an IPv6 address yet (e.g., it's still early in
the boot). Such requests are immediately rejected.
Signed-off-by: Doug Evans <dje@google.com>
|
|
Listen v6only
See merge request slirp/libslirp!77
|
|
tcpx_listen: tcp_newtcpcb doesn't fail
See merge request slirp/libslirp!79
|
|
slirp_add_host*fwd: Ensure all error paths set errno
See merge request slirp/libslirp!80
|
|
Debugging bind/listen failures without errno can get painful.
Signed-off-by: Doug Evans <dje@google.com>
|
|
Signed-off-by: Doug Evans <dje@google.com>
|
|
They are superseded by slirp_add/remove_hostxfwd
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
Move DEBUG_CALL("if_start") to DEBUG_VERBOSE_CALL
See merge request slirp/libslirp!78
|
|
Add ipv4/ipv6-agnostic host forwarding functions
See merge request slirp/libslirp!75
|
|
That allows to request binding on v6 addresses only.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
This debugging printf reduces the overall S/N ratio of debug output
in the normal case, so separate it out.
Signed-off-by: Doug Evans <dje@google.com>
|
|
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
This actually makes most of the code simpler.
|
|
Neighbor info
See merge request slirp/libslirp!71
|
|
m_cleanup_list: make static
See merge request slirp/libslirp!76
|
|
This will be called from QEMU to dump the ARP/NDP tables.
ndpentry.eth_addr type changed from unsigned char to uint8_t
to be consistent with other macaddr objects.
Ditto for slirp_arphdr.{ar_sha,ar_tha}.
Signed-off-by: Doug Evans <dje@google.com>
|
|
Was causing compilation failures with -Werror=missing-prototypes.
|
|
... and call it everywhere a macaddr is pretty-printed.
Signed-off-by: Doug Evans <dje@google.com>
|
|
|
|
|
|
Expose udpx_listen and tcpx_listen as taking sockaddr
See merge request slirp/libslirp!74
|
|
Disable polling for PRI on MacOS
Closes #35
See merge request slirp/libslirp!73
|
|
Fixes #35.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
This generalizes adding hostfwd, and opens the path for cross ipv4/6
forward.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
to get struct sbuf
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
|
Set macOS deployment target
Closes #36
See merge request slirp/libslirp!72
|
|
Without a macOS deployment target, the resulting library does not work on macOS versions lower than it was currently built on.
For example, if libslirp was built on macOS 10.15, it would not work on macOS 10.14.
|
|
Add /build/ to .gitignore
See merge request slirp/libslirp!69
|
|
The docs suggest building in ./build, which is cool.
Add build to .gitignore so it doesn't interfere with git.
Signed-off-by: Doug Evans <dje@google.com>
|
|
m_cleanup: fix memory leaks
See merge request slirp/libslirp!68
|
|
This should ensure the lists are considered empty after the cleanup
|
|
m_cleanup didn't cleanup the if_batchq and if_fastq queues, resulting in
a memory leak.
|
|
|
|
mbufs added to the freelist shouldn't keep the M_EXT flag as they can be
recycled and the new owner could try to access the freed extended buffer.
|
|
ip6_output: fix memory leak on fast-send
See merge request slirp/libslirp!67
|
|
When emitting NDP Neighbour Sollicitations, ip6_output immediately calls
if_encap without going through any queue. if_encap however does not free
the mbuf, so ip6_output has to do it.
This was leaking one mbuf per NDP NS sent by slirp. Hopefully the guest was
not using more than NDP_TABLE_SIZE (16) IPv6 addresses, in which case it was
limited to a bound number, but more addresses would result to leaks.
|
|
Reject host forwarding to ipv6 "addr-any"
See merge request slirp/libslirp!66
|
|
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@google.com>
|