Following the current changes, future work will involve adding support for options 138 and 139. I have not included these in this patch series because the parsing for both requires significant code changes, which I believe would be too much to review at once.
Regards,
Anshu
This series adds a --dhcpv6-opt CODE,VALUE command-line option to
inject custom options into DHCPv6 replies, complementing the existing
--dhcp-opt support for DHCPv4.
The primary use case is UEFI HTTP Boot, which requires Vendor Class
(option 16) with the correct enterprise-number + length-prefixed wire
encoding per RFC 8415 Section 21.16, and Boot File URL (option 59).
Value formats are determined automatically from the option code via a
type table. Supported types include plain strings, IPv6
addresses (single and list), 8/16/32-bit integers, vendor class
(ENTERPRISE:DATA), and length-prefixed string lists.
Patch 1 adds the CLI flag, storage, and basic man page entry.
Patch 2 adds the type table and binary parser for all supported types.
Patch 3 injects the parsed options into DHCPv6 reply packets.
Anshu Kumari (3):
conf: Add --dhcpv6-opt command-line option
dhcpv6: Add option type table and value parser
dhcpv6: Inject custom options into DHCPv6 replies
conf.c | 26 ++++-
dhcpv6.c | 295 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
dhcpv6.h | 1 +
passt.1 | 30 ++++++
passt.h | 16 +++
5 files changed, 367 insertions(+), 1 deletion(-)
--
2.54.0