aboutsummaryrefslogtreecommitdiff
path: root/src/bootp.c
AgeCommit message (Collapse)AuthorFilesLines
2022-02-17bootp: fix g_str_has_prefix warning/criticalMarc-André Lureau1-1/+1
Fixes: commit 60535013c3e ("bootp: add support for UEFI HTTP boot") Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-25bootp: add support for UEFI HTTP bootIgnat Korchagin1-0/+23
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>
2021-11-18Allow to disable internal DHCP serverRafael Gieschke1-1/+1
Setting `cfg->disable_dhcp` to `true` will disable the internal DHCP server. Signed-off-by: Rafael Gieschke <rafael@gieschke.de>
2021-06-21dhcp: Always send DHCP_OPT_LEN bytes in optionsSamuel Thibault1-3/+3
RFC2131 suggests that the options field may be at least 312 bytes. Some DHCP clients seem to assume that it has to be at least 312 bytes. Fixes #51 Fixes: f13cad45b25d92760bb0ad67bec0300a4d7d5275 ("bootp: limit vendor-specific area to input packet memory buffer") Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2021-06-18Fix "DHCP broken in libslirp v4.6.0"Akihiro Suda1-1/+3
Fix issue 48 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-06-14bootp: check bootp_input buffer sizeMarc-André Lureau1-2/+2
Fixes: CVE-2021-3592 Fixes: https://gitlab.freedesktop.org/slirp/libslirp/-/issues/44 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-06-14bootp: limit vendor-specific area to input packet memory bufferMarc-André Lureau1-11/+15
sizeof(bootp_t) currently holds DHCP_OPT_LEN. Remove this optional field from the structure, to help with the following patch checking for minimal header size. Modify the bootp_reply() function to take the buffer boundaries and avoiding potential buffer overflow. Related to CVE-2021-3592. https://gitlab.freedesktop.org/slirp/libslirp/-/issues/44 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-01-22bootp: replace simple snprintf() with strcpy()Marc-André Lureau1-3/+4
Minor code simplification. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-01-22bootp: remove extra castMarc-André Lureau1-1/+1
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-08-01Fix bogus indent, no source changeSamuel Thibault1-6/+4
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2019-03-22slirp: clarify license of slirp files using SPDX: explicit MITMarc-André Lureau1-0/+1
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>
2019-03-07slirp: move sources to src/ subdirectoryMarc-André Lureau1-0/+369
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>