core: don't have IP4 and IP6 configs on slaves
Although it's convenient in some places to have IP configs on all connections, it makes more sense in other places to not have IP configs on slaves. (eg, it's confusing for nmcli, etc, to report a full NMSettingIP4Config on a slave device). So revert parts of the earlier patch. However, it's still safe to assume that s_ip4 != NULL if method != DISABLED, so some of the earlier simplifications can stay. Also, add nm_utils_get_ip_config_method(), which returns the correct IP config method for a connection, whether the connection has IP4 and IP6 settings objects or not, and use that to keep some more of the simplifications from the earlier patch.
This commit is contained in:
@@ -84,6 +84,8 @@ gboolean nm_utils_get_proc_sys_net_value_with_bounds (const char *path,
|
||||
|
||||
void nm_utils_normalize_connection (NMConnection *connection,
|
||||
gboolean default_enable_ipv6);
|
||||
const char *nm_utils_get_ip_config_method (NMConnection *connection,
|
||||
GType ip_setting_type);
|
||||
|
||||
void nm_utils_complete_generic (NMConnection *connection,
|
||||
const char *ctype,
|
||||
|
Reference in New Issue
Block a user