Age | Commit message (Collapse) | Author | Files | Lines |
|
To be able to use typeof.
Fixes #24604
|
|
ncsi: Add basic Get Version ID response
See merge request slirp/libslirp!122
|
|
Get Version ID is one of the first commands used in NC-SI, because BMC's
use a lot of OEM NC-SI extensions, and you need to query the device's
manufacturer through Get Version ID before you can decide which OEM
NC-SI extensions to use.
The response format is documented in the NC-SI spec[1]. We're just
setting the NC-SI version supported to 1.0.0 (BCD-encoded[2]) and
returning the manufacturer's ID in network byte-order.
[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0222_1.0.0.pdf
[2] https://en.wikipedia.org/wiki/Binary-coded_decimal
Signed-off-by: Peter Delevoryas <pdel@fb.com>
|
|
This will let us use Slirp fields to generate more interesting NC-SI
responses.
Signed-off-by: Peter Delevoryas <pdel@fb.com>
|
|
The manufacturer's ID is used in NC-SI commands such as "Get Version ID"
[1]. It is also essential to providing a path towards adding OEM
(non-standardized) NC-SI commands.
This field should be derived from the IANA Private Enterprise Numbers list,
per the NC-SI specification. It may be useful for things besides NC-SI, but
NC-SI responses for BMC's in QEMU are the main use case I have in mind.
Note: I did not add this attribute to slirp_init, since it is deprecated.
[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0222_1.0.0.pdf
[2] https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
Signed-off-by: Peter Delevoryas <pdel@fb.com>
|
|
Add support for Haiku to meson.build
See merge request slirp/libslirp!123
|
|
|
|
win32: declare some local functions as static
See merge request slirp/libslirp!121
|
|
Enable extra warnings based no what QEMU uses.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
These functions do not have a prototype and are not meant to be public.
Declare them as static.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Include <sys/socket.h> and <arpa/inet.h> for AF_INET6 and inet_pton
Closes #58
See merge request slirp/libslirp!120
|
|
Fixes #58
|
|
Release v4.7.0
See merge request slirp/libslirp!119
|
|
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
Support for CFI
See merge request slirp/libslirp!117
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The introduction of .timer_new_opaque adds an interesting conundrum.
The Slirp* needs to be stored in .timer_new_opaque so that it can be
passed back to slirp_handle_timer, but it is not returned by slirp_new
and slirp_init until after the first call to .timer_new_opaque (which
is in ip6_init). This is a problem for programs that, like QEMU, use
more than one Slirp*.
Fix them by passing the Slirp* to a callback before slirp_new returns,
and initializing the timer afterwards.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Add a new callback that supports CFI better by avoiding having function pointers
in the external libslirp API. Instead, the new API passes an opaque integer
and requests the application to call a new libslirp function when the timer
expires.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
In order to support CFI, we would like to avoid passing function pointers out of
libslirp, and instead use opaque integers for the timer callbacks. This patch
introduces an internal API for creating a timer that is based on such a timer
callback.
For now, it receives the id (SLIRP_TIMER_RA is the only one) and calls
slirp->cb->timer_new. The prototype of ra_timer_handler is changed slightly
to fit better with the next patch which introduces a new libslirp function,
to be called on timer expiration.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Handle ECONNABORTED from recv
See merge request slirp/libslirp!116
|
|
recv can return ECONNABORTED due to a time-out on the socket. The socket is no longer useable once it enters this state.
|
|
bootp: fix g_str_has_prefix warning/critical
See merge request slirp/libslirp!115
|
|
Fixes: commit 60535013c3e ("bootp: add support for UEFI HTTP boot")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
When debug is enabled, we duplicate the packet in tcp_reass, but ti is still
pointing to the old buffer, resulting in a use after free.
This makes valgrind debugging a little trickier, but makes it
crash a lot less.
Signed-off-by: Brett Nash <nash@fb.com>
|
|
Avoid a macro translation when not needed, and potentially doing really
weird things to headers.
|
|
mbuf: Use SLIRP_DEBUG to enable mbuf debugging instead of DEBUG
See merge request slirp/libslirp!114
|
|
DEBUG is set by a number of IDEs and development environments (*cough*
xcode *cough*). This means we use mbuf duplication when we don't need
(or expect) it. Change the name to SLIRP_DEBUG to enable this feature.
Signed-off-by: Pablo Fiori <pablofiori@fb.com>
Signed-off-by: Brett Nash <nash@fb.com>
|
|
inet_ntoa() returns a static pointer which is subject to safety issues.
Use the recommended alternative.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
Add VMS_END marker
See merge request slirp/libslirp!112
|
|
The migration VMSTATE_END_OF_LIST marker relies on a NULL field
to mark th eend of a list; that's a bit delicate when the marker is
forgotten and the code hits a NULL by luck.
Use an explicit flag to mark the end as well.
See: https://lists.gnu.org/archive/html/qemu-devel/2022-01/msg03025.html
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
bootp: add support for UEFI HTTP boot
See merge request slirp/libslirp!111
|
|
Current bootp implementation is only one step away from supporting UEFI HTTP
boot in QEMU. The only missing bit is that the UEFI specification [1] requires
a vendor class identifier option (num 60) set to "HTTPClient" string present
in the DHCP response.
OVMF [2] indeed ignores the DHCP response and considers UEFI HTTP boot as
failed, if this option is not present.
With this change one would be able to configure QEMU user networking like
below:
$ qemu ... -nic user,tftp=tftp-root,bootfile=http://10.0.2.2/ipxe.efi
and boot the VM using UEFI HTTP boot instead of TFTP.
[1]: https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf
[2]: https://github.com/tianocore/edk2/tree/5302bd81d9ba0c9e7f2371a81c438ec919ec8e1e/OvmfPkg
Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
|
|
IPv6 DNS proxying support
Closes #55
See merge request slirp/libslirp!110
|
|
|
|
|
|
|
|
Support Unix sockets in hostfwd
See merge request slirp/libslirp!103
|
|
Signed-off-by: Nicholas Ngai <nicholas@ngai.me>
|
|
Signed-off-by: Nicholas Ngai <nicholas@ngai.me>
|
|
Signed-off-by: Nicholas Ngai <nicholas@ngai.me>
|
|
Signed-off-by: Nicholas Ngai <nicholas@ngai.me>
|
|
socket: Initialize so_type in socreate
See merge request slirp/libslirp!109
|
|
Signed-off-by: Nicholas Ngai <nicholas@ngai.me>
|
|
Signed-off-by: Nicholas Ngai <nicholas@ngai.me>
|
|
Allow to disable internal DHCP server
See merge request slirp/libslirp!22
|
|
Setting `cfg->disable_dhcp` to `true` will disable the internal DHCP server.
Signed-off-by: Rafael Gieschke <rafael@gieschke.de>
|
|
pingtest: Add a trivial ping test
See merge request slirp/libslirp!91
|