mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 16:40:16 +01:00
dhcp: ensure the IP4 method is compatible with DHCP
This commit is contained in:
parent
c049680515
commit
c35bec214c
1 changed files with 7 additions and 0 deletions
|
|
@ -482,6 +482,13 @@ nm_dhcp_manager_start_ip4 (NMDHCPManager *self,
|
|||
priv = NM_DHCP_MANAGER_GET_PRIVATE (self);
|
||||
|
||||
if (s_ip4) {
|
||||
const char *method = nm_setting_ip4_config_get_method (s_ip4);
|
||||
|
||||
if (method) {
|
||||
/* Method must be 'auto' */
|
||||
g_return_val_if_fail (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0, NULL);
|
||||
}
|
||||
|
||||
if ( nm_setting_ip4_config_get_dhcp_send_hostname (s_ip4)
|
||||
&& (nm_setting_ip4_config_get_dhcp_hostname (s_ip4) == NULL)
|
||||
&& priv->hostname_provider != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue