diff --git a/system-settings/plugins/ifcfg-rh/reader.c b/system-settings/plugins/ifcfg-rh/reader.c index c98cf6e27..28244206a 100644 --- a/system-settings/plugins/ifcfg-rh/reader.c +++ b/system-settings/plugins/ifcfg-rh/reader.c @@ -1233,6 +1233,7 @@ make_ip4_setting (shvarFile *ifcfg, NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS, !svTrueValue (ifcfg, "PEERDNS", TRUE), NM_SETTING_IP4_CONFIG_IGNORE_AUTO_ROUTES, !svTrueValue (ifcfg, "PEERROUTES", TRUE), NM_SETTING_IP4_CONFIG_NEVER_DEFAULT, never_default, + NM_SETTING_IP4_CONFIG_MAY_FAIL, !svTrueValue (ifcfg, "IPV4_FAILURE_FATAL", TRUE), NULL); /* Handle manual settings */ @@ -1488,6 +1489,7 @@ make_ip6_setting (shvarFile *ifcfg, NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS, !svTrueValue (ifcfg, "IPV6_PEERDNS", TRUE), NM_SETTING_IP6_CONFIG_IGNORE_AUTO_ROUTES, !svTrueValue (ifcfg, "IPV6_PEERROUTES", TRUE), NM_SETTING_IP6_CONFIG_NEVER_DEFAULT, never_default, + NM_SETTING_IP6_CONFIG_MAY_FAIL, !svTrueValue (ifcfg, "IPV6_FAILURE_FATAL", FALSE), NULL); if (!strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) { diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-manual b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-manual index 4be4044f1..45db0e4c4 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-manual +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-manual @@ -16,3 +16,4 @@ IPV6INIT=yes IPV6_AUTOCONF=no IPV6ADDR="1001:abba::1234/56" IPV6ADDR_SECONDARIES="2001:abba::2234/64 3001:abba::3234/96" +IPV6_FAILURE_FATAL=no diff --git a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 9a370be45..7ca0ecf87 100644 --- a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -2011,6 +2011,12 @@ test_read_wired_ipv6_manual (void) NM_SETTING_IP6_CONFIG_SETTING_NAME, NM_SETTING_IP6_CONFIG_NEVER_DEFAULT); + ASSERT (nm_setting_ip6_config_get_may_fail (s_ip6) == TRUE, + "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_MAY_FAIL); + /* IP addresses */ ASSERT (nm_setting_ip6_config_get_num_addresses (s_ip6) == 3, "wired-ipv6-manual-verify-ip6", "failed to verify %s: unexpected %s / %s key value", @@ -5157,6 +5163,7 @@ test_write_wired_static (void) g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_MANUAL, + NM_SETTING_IP4_CONFIG_MAY_FAIL, TRUE, NULL); addr = nm_ip4_address_new (); @@ -5188,6 +5195,7 @@ test_write_wired_static (void) g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_MANUAL, + NM_SETTING_IP6_CONFIG_MAY_FAIL, TRUE, NULL); /* Add addresses */ diff --git a/system-settings/plugins/ifcfg-rh/writer.c b/system-settings/plugins/ifcfg-rh/writer.c index d1e1458f7..30ef6e394 100644 --- a/system-settings/plugins/ifcfg-rh/writer.c +++ b/system-settings/plugins/ifcfg-rh/writer.c @@ -1087,6 +1087,10 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) svSetValue (ifcfg, "DHCP_CLIENT_ID", value, FALSE); } + svSetValue (ifcfg, "IPV4_FAILURE_FATAL", + nm_setting_ip4_config_get_may_fail (s_ip4) ? "no" : "yes", + FALSE); + /* Static routes - route- file */ route_path = utils_get_route_path (ifcfg->fileName); if (!route_path) { @@ -1373,6 +1377,10 @@ write_ip6_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) FALSE); } + svSetValue (ifcfg, "IPV6_FAILURE_FATAL", + nm_setting_ip6_config_get_may_fail (s_ip6) ? "no" : "yes", + FALSE); + /* Static routes go to route6- file */ route6_path = utils_get_route6_path (ifcfg->fileName); if (!route6_path) {