mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-11 08:08:54 +02:00
ip6: disallow setting ipv6.dhcp-request-options
Disallow setting the ipv6.dhcp-request-options by verifying that no value has been set. This is neccessary, as the option is currently not supported, but may be supported in the future. The problem implementing the DHCPv6 support is that NetworkManager currently uses the systemd DHCPv6 implementation. But in order to access the option data (already parsed by systemd) we would need to include private systemd headers, as the necessary functions or structures are not exposed in the currently included headers. As the long term goal is to replace the DHCPv6 implementation, the setting is kept for ipv4/ipv6 so it can be implemented quickly when a new DHCPv6 implementation is added.
This commit is contained in:
parent
75c1ddce19
commit
72b5b63930
1 changed files with 12 additions and 0 deletions
|
|
@ -464,6 +464,18 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (nm_setting_ip_config_has_dhcp_request_options(s_ip)) {
|
||||
g_set_error_literal(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("Requesting additional DHCPv6 options is not supported for IPv6"));
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_IP6_CONFIG_SETTING_NAME,
|
||||
NM_SETTING_IP_CONFIG_DHCP_REQUEST_OPTIONS);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Failures from here on, are NORMALIZABLE_ERROR... */
|
||||
|
||||
if (token_needs_normalization) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue