mirror of
https://github.com/ipxe/ipxe
synced 2026-05-09 18:00:12 +03:00
[ipv6] Obtain MTU setting from NDP
RA contains MTU setting, this is especially needed in some networks which don't have a a full 1500 MTU link to IPv6 internet. Mostly due to some providers (such as Microsoft Azure) not having a working pMTUd setup. Signed-off-by: Christian I. Nilsson <nikize@gmail.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
1eb571cef4
commit
1b6d88d646
@@ -68,6 +68,19 @@ struct ndp_prefix_information_option {
|
||||
/** NDP autonomous address configuration flag */
|
||||
#define NDP_PREFIX_AUTONOMOUS 0x40
|
||||
|
||||
/** NDP MTU option */
|
||||
#define NDP_OPT_MTU 5
|
||||
|
||||
/** NDP MTU */
|
||||
struct ndp_mtu_option {
|
||||
/** NDP option header */
|
||||
struct ndp_option_header header;
|
||||
/** Reserved */
|
||||
uint16_t reserved;
|
||||
/** MTU */
|
||||
uint32_t mtu;
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** NDP recursive DNS server option */
|
||||
#define NDP_OPT_RDNSS 25
|
||||
|
||||
@@ -106,6 +119,8 @@ union ndp_option {
|
||||
struct ndp_ll_addr_option ll_addr;
|
||||
/** Prefix information option */
|
||||
struct ndp_prefix_information_option prefix;
|
||||
/** MTU option */
|
||||
struct ndp_mtu_option mtu;
|
||||
/** Recursive DNS server option */
|
||||
struct ndp_rdnss_option rdnss;
|
||||
/** DNS search list option */
|
||||
|
||||
@@ -1046,6 +1046,16 @@ static int ndp_register_settings ( struct net_device *netdev,
|
||||
return rc;
|
||||
}
|
||||
|
||||
/** MTU setting */
|
||||
const struct setting ndp_mtu_setting __setting ( SETTING_NETDEV, mtu ) = {
|
||||
.name = "mtu",
|
||||
.description = "MTU",
|
||||
.tag = NDP_TAG ( NDP_OPT_MTU, offsetof ( struct ndp_mtu_option, mtu ),
|
||||
sizeof ( uint32_t ) ),
|
||||
.type = &setting_type_int16,
|
||||
.scope = &ndp_settings_scope,
|
||||
};
|
||||
|
||||
/** DNS server setting */
|
||||
const struct setting ndp_dns6_setting __setting ( SETTING_IP6_EXTRA, dns6 ) = {
|
||||
.name = "dns6",
|
||||
|
||||
Reference in New Issue
Block a user