Commits on Source (63)
-
Marc-André Lureau authored
Release v4.4.0 See merge request !59
08b663f5 -
Marc-André Lureau authored
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
07e8cfac -
Marc-André Lureau authored
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
4c4e0358 -
Samuel Thibault authored
Remove some needless (void)casts See merge request !60
bacb71f1 -
Nathaniel Wesley Filardo authored
Blocked signal state is inherited across exec(), so let's zero that out rather than inherit whatever it was when we spawned the child. POSIX has some strange rules about SIG_IGN'd SIGCHLD across exec, so let's not do that, just for consistency.
eee9db9d -
Samuel Thibault authored
fork_exec_child_setup: improve signal handling See merge request !61
72654d84 -
Marc-André Lureau authored
../../subprojects/libslirp/src/slirp.c:131:17: error: unused variable 'old_stat' [-Werror,-Wunused-variable] struct stat old_stat; ^ ../../subprojects/libslirp/src/slirp.c:143:10: error: unused variable 'buff' [-Werror,-Wunused-variable] char buff[512]; ^ 2 errors generated. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
216f434a -
Samuel Thibault authored
Fix unused variables See merge request !63
5dce846e -
Hafiz Abid Qadeer authored
We observed slow responses on a host forwarded port on Windows. Investigation revealed that qemu_fd_register was being called with fd=-1 and this caused g_poll in qemu_poll_ns timing out. I tracked this behavior to following commit: 748f8f4b slirp: replace qemu_set_nonblock() @@ -482,7 +483,8 @@ void tcp_connect(struct socket *inso) tcp_close(sototcpcb(so)); /* This will sofree() as well */ return; } - qemu_set_nonblock(s); + slirp_set_nonblock(s); + so->slirp->cb->register_poll_fd(so->s); It seems that calling register_poll_fd with so->s instead of s may be a typo. Changing it back to s solves this issue. The commit 748f8f4b made similar change in tcp_fconnect but I have not touched it. Signed-off-by: Hafiz Abid Qadeer <abidh@codesourcery.com>
9f78e949 -
Samuel Thibault authored
[PATCH] Fix a typo that can cause slow socket response on Windows. See merge request !64
4284fc86 -
Samuel Thibault authored
This is actually similar to the fix in 9f78e949 ("Fix a typo that can cause slow socket response on Windows."), except that here there is no semantic change since s = so->s above. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
50a9171f -
Doug Evans authored
Two exported functions are added which are the ipv6 versions of their ipv4 counterparts: slirp_add_ipv6_hostfwd, slirp_remove_ipv6_hostfwd. Signed-off-by: Doug Evans <dje@google.com>
0624fbe7 -
Samuel Thibault authored
Add ipv6 host forward support See merge request !62
52c9f8de -
Samuel Thibault authored11098874
-
Samuel Thibault authored89d82f69
-
Doug Evans authored
Signed-off-by: Doug Evans <dje@google.com>
9c2b4714 -
Samuel Thibault authored
tcpx_listen: Pass sizeof(addr) to memset See merge request !65
5aa333e7 -
Doug Evans authored
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>
b55df476 -
Samuel Thibault authored
Reject host forwarding to ipv6 "addr-any" See merge request slirp/libslirp!66
26ae658a -
Samuel Thibault authored
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.
a973c592 -
Samuel Thibault authored
ip6_output: fix memory leak on fast-send See merge request slirp/libslirp!67
99b3b70a -
jeremy marchand authored
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.
ff605089 -
jeremy marchand authoreddda999f3
-
jeremy marchand authored
m_cleanup didn't cleanup the if_batchq and if_fastq queues, resulting in a memory leak.
c698e5a0 -
jeremy marchand authored
This should ensure the lists are considered empty after the cleanup
d0a8ca75 -
Samuel Thibault authored
m_cleanup: fix memory leaks See merge request !68
f97b7220 -
Doug Evans authored
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>
f85d2582 -
Marc-André Lureau authored
Add /build/ to .gitignore See merge request !69
5c5d4c47 -
WaluigiWare64 authored
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.
410e296a -
Marc-André Lureau authored
Set macOS deployment target Closes #36 See merge request !72
bcb616e3 -
Samuel Thibault authored4873017e
-
Samuel Thibault authored
to get struct sbuf Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
add9111f -
Samuel Thibault authored
This generalizes adding hostfwd, and opens the path for cross ipv4/6 forward. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
d29c5f8b -
Samuel Thibault authored
Fixes #35. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
7271345e -
Samuel Thibault authored
Disable polling for PRI on MacOS Closes #35 See merge request !73
684f4e72 -
Samuel Thibault authored
Expose udpx_listen and tcpx_listen as taking sockaddr See merge request !74
de67f491 -
Samuel Thibault authoredd6be9d23
-
Samuel Thibault authored1d51fab5
-
Doug Evans authored
... and call it everywhere a macaddr is pretty-printed. Signed-off-by: Doug Evans <dje@google.com>
ac00ba46 -
Doug Evans authored
Was causing compilation failures with -Werror=missing-prototypes.
37cd8b8c -
Doug Evans authored
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>
6a0176df -
Samuel Thibault authored
m_cleanup_list: make static See merge request slirp/libslirp!76
77098b8e -
Samuel Thibault authored
Neighbor info See merge request slirp/libslirp!71
8dc8d72a -
Samuel Thibault authored
This actually makes most of the code simpler.
84579d03 -
Samuel Thibault authored
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
666235c0 -
Doug Evans authored
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>
0c07defb -
Samuel Thibault authored
That allows to request binding on v6 addresses only. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
d9c09e57 -
Samuel Thibault authored
Add ipv4/ipv6-agnostic host forwarding functions See merge request slirp/libslirp!75
43930496 -
Samuel Thibault authored
Move DEBUG_CALL("if_start") to DEBUG_VERBOSE_CALL See merge request slirp/libslirp!78
487f4bf4 -
Samuel Thibault authored
They are superseded by slirp_add/remove_hostxfwd Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
9aaa17b5 -
Doug Evans authored
Signed-off-by: Doug Evans <dje@google.com>
0d90aa7c -
Doug Evans authored
Debugging bind/listen failures without errno can get painful. Signed-off-by: Doug Evans <dje@google.com>
cc53bd21 -
Samuel Thibault authored
slirp_add_host*fwd: Ensure all error paths set errno See merge request !80
209288ae -
Samuel Thibault authored
tcpx_listen: tcp_newtcpcb doesn't fail See merge request !79
4b30c086 -
Samuel Thibault authored
Listen v6only See merge request !77
fcf2568d -
Doug Evans authored
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>
f8bc26ad -
Samuel Thibault authored
Perform lazy guest address resolution for IPv6 See merge request !81
4e6444e8 -
philmd authored
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>
6690d556 -
Marc-André Lureau authored
Remove alloca() call in get_dns_addr_resolv_conf() See merge request !84
61b287a1 -
Samuel Thibault authored
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.
1d6a89cc -
Samuel Thibault authored
ndp_table: For unspecified address, return broadcast ethernet address See merge request !86
f23fd3f0 -
Samuel Thibault authoredc221087f
-
Marc-André Lureau authored
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>