diff options
author | Stas Sergeev <stsp2@yandex.ru> | 2023-08-29 14:14:06 +0500 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-09-07 11:24:46 +0200 |
commit | 1f24d3efb4996b6bbc9a2ea4c040b230aac986a0 (patch) | |
tree | 36eced6acad5b1ac31e2eb68c8f9cf1fa79f8b2a | |
parent | d8c4f23ecdaf59350e686b786860a41a2e4d4dda (diff) | |
download | passt-1f24d3efb4996b6bbc9a2ea4c040b230aac986a0.tar passt-1f24d3efb4996b6bbc9a2ea4c040b230aac986a0.tar.gz passt-1f24d3efb4996b6bbc9a2ea4c040b230aac986a0.tar.bz2 passt-1f24d3efb4996b6bbc9a2ea4c040b230aac986a0.tar.lz passt-1f24d3efb4996b6bbc9a2ea4c040b230aac986a0.tar.xz passt-1f24d3efb4996b6bbc9a2ea4c040b230aac986a0.tar.zst passt-1f24d3efb4996b6bbc9a2ea4c040b230aac986a0.zip |
dhcp: support BOOTP clients
BOOTP clients do not use tagged messages for requests.
As such, any message without the DHCP option 53, should be
considered a BOOTP request.
Link: https://bugs.passt.top/show_bug.cgi?id=72
Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | dhcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -323,8 +323,8 @@ int dhcp(const struct ctx *c, const struct pool *p) if (opts[53].c[0] == DHCPDISCOVER) { info("DHCP: offer to discover"); opts[53].s[0] = DHCPOFFER; - } else if (opts[53].c[0] == DHCPREQUEST) { - info("DHCP: ack to request"); + } else if (opts[53].c[0] == DHCPREQUEST || !opts[53].clen) { + info("%s: ack to request", opts[53].clen ? "DHCP" : "BOOTP"); opts[53].s[0] = DHCPACK; } else { return -1; |