mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
[dns] Support DNS search lists
Update the DNS resolver to support DNS search lists (as provided by DHCP option 119, DHCPv6 option 24, or NDP option 31). Add validation code to ensure that parsing of DNS packets does not overrun the input, get stuck in infinite loops, or (worse) write beyond the end of allocated buffers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -86,6 +86,7 @@ static uint8_t dhcp_request_options_data[] = {
|
||||
DHCP_LOG_SERVERS, DHCP_HOST_NAME, DHCP_DOMAIN_NAME,
|
||||
DHCP_ROOT_PATH, DHCP_VENDOR_ENCAP, DHCP_VENDOR_CLASS_ID,
|
||||
DHCP_TFTP_SERVER_NAME, DHCP_BOOTFILE_NAME,
|
||||
DHCP_DOMAIN_SEARCH,
|
||||
128, 129, 130, 131, 132, 133, 134, 135, /* for PXE */
|
||||
DHCP_EB_ENCAP, DHCP_ISCSI_INITIATOR_IQN ),
|
||||
DHCP_END
|
||||
|
||||
@@ -979,3 +979,12 @@ const struct setting filename6_setting __setting ( SETTING_BOOT, filename ) = {
|
||||
.type = &setting_type_string,
|
||||
.scope = &ipv6_scope,
|
||||
};
|
||||
|
||||
/** DNS search list setting */
|
||||
const struct setting dnssl6_setting __setting ( SETTING_IP_EXTRA, dnssl ) = {
|
||||
.name = "dnssl",
|
||||
.description = "DNS search list",
|
||||
.tag = DHCPV6_DOMAIN_LIST,
|
||||
.type = &setting_type_dnssl,
|
||||
.scope = &ipv6_scope,
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user