- May 22, 2019
-
-
Marc-André Lureau authored
Let's follow gitlab project name. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
- May 07, 2019
-
-
Samuel Thibault authored
Add README.md and gitignore See merge request !7
-
Marc-André Lureau authored
Fixes: slirp/libslirp#7 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
Eric Blake authored
Ignore build artifacts during an in-tree build. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20190507143727.15640-1-eblake@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
- May 06, 2019
-
-
Marc-André Lureau authored
Memory fixes for slirp tcp_emu() See merge request slirp/libslirp!6
-
Marc-André Lureau authored
For some reason, EMU_IDENT is not like other "emulated" protocols and tries to reconstitute the original buffer, if it came in multiple packets. Unfortunately, it does so wrongly, as it doesn't respect the sbuf circular buffer appending rules, nor does it maintain some of the invariants (rptr is incremented without bounds, etc): this leads to further memory corruption revealed by ASAN or various malloc errors. Furthermore, the so_rcv buffer is regularly flushed, so there is no guarantee that buffer reconstruction will do what is expected. Instead, do what the function comment says: "XXX Assumes the whole command came in one packet", and don't touch so_rcv. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1664205 Cc: Prasad J Pandit <pjp@fedoraproject.org> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
- May 04, 2019
-
-
This attribute is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets. Signed-off-by: Cao Jiaxi <driver1998@foxmail.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- May 03, 2019
-
-
Marc-André Lureau authored
Prevents from buffer overflows. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1664205 Cc: Prasad J Pandit <pjp@fedoraproject.org> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
- Apr 15, 2019
-
-
Gcc 9 needs some convincing that sopreprbuf really is going to fill in iov in the call from soreadbuf, even though the failure case shouldn't happen. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190415121740.9881-1-dgilbert@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Mar 28, 2019
-
-
Marc-André Lureau authored
remove qtailq.h See merge request slirp/libslirp!4
-
Akihiro Suda authored
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
-
- Mar 27, 2019
-
-
Samuel Thibault authored
Add meson build & gitlab CI See merge request slirp/libslirp!2
-
Samuel Thibault authored
Add .clang-format See merge request slirp/libslirp!3
-
- Mar 26, 2019
-
-
Marc-André Lureau authored
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Add SLIRP_CHECK_VERSION() macro, and slirp_version_string() helpers. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Build a shared library, exporting only slirp_* symbols. Install API headers and a slirp.pc pkg-config. It has been tested to build on Linux and with mingw64 cross-compilation. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
- Mar 25, 2019
-
-
Marc-André Lureau authored
Add the .clang-format used for formatting the slirp code during the import from qemu. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
- Mar 22, 2019
-
-
Marc-André Lureau authored
slirp has been maintained by the QEMU maintainers and will be maintained under an independent project soon. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kelly Price <strredwolf@gmail.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
The slirp COPYRIGHT file is a BSD-3 license. Instead of referring to another project file, the SPDX license notice present in all source files states that unequivocally. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
-
Marc-André Lureau authored
Add SPDX license identifier to clarify the license of files without explicit license header. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
-
Marc-André Lureau authored
Add SPDX license identifier to clarify the license of files with reference to BSD license from slirp COPYRIGHT file. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
-
Marc-André Lureau authored
Add SPDX license identifier to clarify the license of files with explicit MIT license header. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
-
Marc-André Lureau authored
Add SPDX license identifier to clarify the license of files with explicit 3-clause BSD license header. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
-
Marc-André Lureau authored
In order to make slirp a standalone project, the project must have a clear license, and be compatible with the GPL or LGPL. Since commit 2f5f89963186d42a7ded253bc6cf5b32abb45cec ("Remove the advertising clause from the slirp license"), slirp is BSD-3. But new files have been added under slirp/ with QEMU GPL license since then. The copyright holders have been asked to relicense files to BSD-3 and gave their permission: - slirp/dhcpv6.{c,h} Subject: Re: Clearing slirp/ license To: "Marc-André Lureau" <marcandre.lureau@gmail.com>, QEMU <qemu-devel@nongnu.org>, Thomas Huth <thuth@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org>, Samuel Thibault <samuel.thibault@ens-lyon.org> References: <CAJ+F1CKBRNdLPb_wOLhURdUJd-j1RHY2toKSTEhCBt_zs4Xk1w@mail.gmail.com> From: "Cédric Le Goater" <clg@kaod.org> Message-ID: <e942cdab-fe1b-fdf4-3b9f-da16a4afa953@kaod.org> Date: Mon, 11 Mar 2019 16:23:25 +0100 > Could you reply that you have no objection in relicensing those files > are 3-Clause BSD? Fine for me. You can change the license of slirp/ncsi.c and slirp/ncsi-pkt.hto a 3-Clause BSD. Thanks, C. Subject: Re: [Qemu-devel] Clearing slirp/ license To: Peter Maydell <peter.maydell@linaro.org>, Shan Gavin <shan.gavin@gmail.com> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>, "Marc-André Lureau" <marcandre.lureau@gmail.com>, Gavin Shan <gwshan@linux.vnet.ibm.com>, Thomas Huth <thuth@redhat.com>, QEMU <qemu-devel@nongnu.org>, Samuel Thibault <samuel.thibault@ens-lyon.org> References: <CAJ+F1CKBRNdLPb_wOLhURdUJd-j1RHY2toKSTEhCBt_zs4Xk1w@mail.gmail.com> <e942cdab-fe1b-fdf4-3b9f-da16a4afa953@kaod.org> <CAJ+F1C+hFfsa5gcSdttTP5J+uyDvNdYJWrm9OJM26+Zc1ZQkew@mail.gmail.com> <cc62e1fd-c564-e1b7-d10c-30665b481352@ozlabs.ru> <CAOL5TwkQXhPjdPP9v7n7mxAVxbDCSo6MEaG+E-Xys=MoD_pg2g@mail.gmail.com> <CAFEAcA_g=L2LSo=B_5dpJhJJrqFiOb6sswMVohQwpVGiKi_A7w@mail.gmail.com> From: "Cédric Le Goater" <clg@kaod.org> Message-ID: <4ddf6031-0df1-b3b5-965e-a181266e42b0@kaod.org> Date: Tue, 12 Mar 2019 11:49:21 +0100 > Is the code in question copyright you personally, or copyright > IBM as your employer at the time ? If the latter, it is IBM that > would need to approve the relicensing. That was done. I had our legal team approve the change of license. Thanks, C. From: Shan Gavin <shan.gavin@gmail.com> Date: Tue, 12 Mar 2019 15:04:54 +0800 Message-ID: <CAOL5TwkQXhPjdPP9v7n7mxAVxbDCSo6MEaG+E-Xys=MoD_pg2g@mail.gmail.com> Subject: Re: [Qemu-devel] Clearing slirp/ license To: Alexey Kardashevskiy <aik@ozlabs.ru> Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, gwshan@linux.vnet.ibm.com, Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>, QEMU <qemu-devel@nongnu.org>, Samuel Thibault <samuel.thibault@ens-lyon.org> > Gavin, could you reply that you have no objection in relicensing > ncsi-pkt.h as 3-Clause BSD? No objection. Please go ahead with the relicensing. Cheers, Gavin - ncsi.c, ncsi-pkt.h Subject: Re: Clearing slirp/ license To: "Marc-André Lureau" <marcandre.lureau@gmail.com>, QEMU <qemu-devel@nongnu.org>, "Cédric Le Goater" <clg@kaod.org> Cc: Peter Maydell <peter.maydell@linaro.org>, Samuel Thibault <samuel.thibault@ens-lyon.org> References: <CAJ+F1CKBRNdLPb_wOLhURdUJd-j1RHY2toKSTEhCBt_zs4Xk1w@mail.gmail.com> From: Thomas Huth <thuth@redhat.com> Message-ID: <ed5a9f55-f2e5-298d-58ac-414759e9b491@redhat.com> Date: Wed, 13 Feb 2019 12:30:32 +0100 > Could you reply that you have no objection in relicensing those files > are 3-Clause BSD? Ok, for the records: I'm fine if you change the license of dhcpv6.[ch] to either 3-Clause BSD or 2-Clause BSD. Thomas - vmstate.{c,h} From: Juan Quintela <quintela@redhat.com> To: "Marc-André Lureau" <marcandre.lureau@gmail.com> Cc: QEMU <qemu-devel@nongnu.org>, Peter Maydell <peter.maydell@linaro.org>, Samuel Thibault <samuel.thibault@ens-lyon.org> Subject: Re: Clearing slirp/ license Date: Tue, 12 Mar 2019 12:43:17 +0100 Message-ID: <87k1h4qpwq.fsf@trasno.org> > Juan, Could you reply that you have no objection in relicensing the > vmstate files as 3-Clause BSD? No problem at all on my side. Later, Juan. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [ for the NC-SI files ] Reviewed-by: Cédric Le Goater <clg@kaod.org> Acked-by: Thomas Huth <thuth@redhat.com>
-
Marc-André Lureau authored
According to commit 2f5f89963186d42a7ded253bc6cf5b32abb45cec ("Remove the advertising clause from the slirp license"), Danny Gasparovski gave permission to license slirp code under 3-clause BSD license: Subject: RE: Slirp license Date: Thu, 8 Jan 2009 10:51:00 +1100 From: "Gasparovski, Daniel" <Daniel.Gasparovski@ato.gov.au> To: "Richard Fontana" <rfontana@redhat.com> I have no objection to having Slirp code in QEMU be licensed under the 3-clause BSD license. slirp/COPYRIGHT's initial version in 2004 (commit 5fafdf24) listed only 3 clauses BUT used the poisonous advertising clause for clause 3 which is the controversial clause of non-free 4-clause (that is, it appears that the BSD-4 license was copied, and then the WRONG clause was deleted, when creating COPYRIGHT. Perhaps explained as an easy mistake to make since 3-clause was created by removing clause 3 of the 4-clause, where you sometimes see the three-clause version with clauses 1, 2, 4; but more commonly see a renumbered version with clauses 1, 2, 3 to close the gap. If you pay attention only to clause numbers instead of content, it can be easy to confuse which clause to delete to go from 4-clause to 3-clause). Commit 2f5f89963 removed the poisonous wrong clause on the grounds of moving from 4-clause to 3-clause; but did not add the missing clause, which makes it LOOK like the 2-clause version. But I think we have a decent enough trail showing the intent for 3-clause. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
-
- Mar 13, 2019
-
-
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190313173949.2369-1-marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Mar 07, 2019
-
-
QEMU no longer includes it, and treats slirp/ as a separate project. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-8-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Add a simple Makefile to build libslirp.a, a static library version of libslirp, to be used by QEMU during a transition period, until a shared library is available. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-6-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Prepare for making slirp/ a standalone project. Remove some useless includes while at it. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-5-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
To avoid conflict with QEMU inet_aton() implementation, let's use the "slirp_" prefix. This allows to drop the WITH_QEMU, thus the source won't make a distinction when building with QEMU or not. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-4-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
slirp migration code uses QEMU vmstate so far, when building WITH_QEMU. Introduce slirp_state_{load,save,version}() functions to move the state saving handling to libslirp side. So far, the bitstream compatibility should remain equal with current QEMU, as this is effectively using the same code, with the same format etc. When libslirp is made standalone, we will need some mechanism to ensure bitstream compatibility regardless of the libslirp version installed. See the FIXME note in the code. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-3-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Add vmstate serialization code adapted from QEMU. Keep only the bits that are required for libslirp. Introduce a IStream/OStream interface to replace QEMU QFile abstraction. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-2-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Mar 06, 2019
-
-
Samuel Thibault authored
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Samuel Thibault authored
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- Based-on: <1551476756-25749-1-git-send-email-will@wbowling.info>
-
When emulating ident in tcp_emu, if the strchr checks passed but the sscanf check failed, two uninitialized variables would be copied and sent in the reply, so move this code inside the if(sscanf()) clause. Signed-off-by: William Bowling <will@wbowling.info> Cc: qemu-stable@nongnu.org Cc: secalert@redhat.com Message-Id: <1551476756-25749-1-git-send-email-will@wbowling.info> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
-
Sometimes sorecvfrom() is called from slirp.c because revents == G_IO_IN, but there is 0 bytes available and recvfrom could be blocking indefinitely. This is likely due to 0-length udp payload. This also adds an error checking for ioctlsocket. Signed-off-by: Vic Lee <llyzs.vic@gmail.com> Message-Id: <20190301064809.3074-1-llyzs.vic@gmail.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Build fails with gcc 9: CC slirp/ndp_table.o slirp/ndp_table.c: In function ‘ndp_table_add’: slirp/ndp_table.c:31:23: error: taking address of packed member of ‘struct ndpentry’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 31 | if (in6_equal(&ndp_table->table[i].ip_addr, &ip_addr)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ slirp/ndp_table.c: In function ‘ndp_table_search’: slirp/ndp_table.c:75:23: error: taking address of packed member of ‘struct ndpentry’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 75 | if (in6_equal(&ndp_table->table[i].ip_addr, &ip_addr)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors The ndpentry structure isn't used to model on-the-wire data or anything else that would care for the struct layout. It doesn't need to be packed actually. Just drop SLIRP_PACKED. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <155143315831.102868.17515265400523392682.stgit@bahia.lan> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Feb 12, 2019
-
-
QEMU wraps the socket functions in os-win32.h, but in commit a9d8b3ec4385793815d71217857304, the header inclusion was dropped, breaking libslirp on Windows. Wrap the missing functions. Rename the wrapped function with "slirp_" prefix and "_wrap" suffix, for consistency and to avoid a clash with existing function (such as "slirp_socket"). Fixes: a9d8b3ec ("slirp: replace remaining qemu headers dependency") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212160953.29051-3-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Tested-by: Howard Spoelstra
-
QEMU wraps the socket functions in os-win32.h, but in commit a9d8b3ec4385793815d71217857304, the header inclusion was dropped, breaking libslirp on Windows. There are already a few socket functions that are wrapped in libslirp, with "slirp_" prefix, but many of them are missing, and we are going to wrap the missing functions in a second patch. Using "slirp_" prefix avoids the conflict with socket function #define wrappers in QEMU os-win32.h, but they are quite intrusive. In the end, the functions should behave the same as original one, but with errno being set. To avoid the churn, and potential confusion, remove the "slirp_" prefix. A series of #undef is necessary until libslirp is made standalone to prevent the #define conflict with QEMU. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212160953.29051-2-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-