tui: properly initialize the IP4 and IP6 settings on new connections
We need to initialize the methods.
This commit is contained in:
@@ -123,6 +123,9 @@ nmt_page_ip4_constructed (GObject *object)
|
||||
s_ip4 = nm_connection_get_setting_ip4_config (conn);
|
||||
if (!s_ip4) {
|
||||
s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
|
||||
g_object_set (G_OBJECT (s_ip4),
|
||||
NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO,
|
||||
NULL);
|
||||
nm_connection_add_setting (conn, (NMSetting *) s_ip4);
|
||||
}
|
||||
|
||||
|
@@ -123,6 +123,9 @@ nmt_page_ip6_constructed (GObject *object)
|
||||
s_ip6 = nm_connection_get_setting_ip6_config (conn);
|
||||
if (!s_ip6) {
|
||||
s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new ();
|
||||
g_object_set (G_OBJECT (s_ip6),
|
||||
NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO,
|
||||
NULL);
|
||||
nm_connection_add_setting (conn, (NMSetting *) s_ip6);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user