Created attachment 1176853 [details] Status of NetworkManager Description of problem: after a manual restart of NetworkManager (for some reasons) with sudo systemctl restart NetworkManager.service having some problems: 1. The Networkmanager icon disappeared from the dashboard of the GNOME3 desktop 2. DNS is no more operable: trying to access remote hosts by a hostname: "ping <hostname>" fails with "ping: <hostname>: Name or service not known" Using the IP address instead of hostname works. Status of NetworkManager: See attachment Version-Release number of selected component (if applicable): NetworkManager-1.2.2-2.fc24.x86_64 How reproducible: Always Steps to Reproduce: 1.sudo systemctl restart NetworkManager.service 2. 3. Actual results: No access to DNS Expected results: NetworkManager icon in the GNOME3 dasboard, and a fully accessible network Additional info: Restarting the NetworkManager with "sudo service NetworkManager restart" in the early days of F24 left a clean network.
Can you please set level=DEBUG in the [logging] section of /etc/NetworkManager/NetworkManager.conf, reproduce the issue and attach NM logs gathered with "journalctl -u NetworkManager -b" ? Thanks!
Created attachment 1177242 [details] NM log
The import part in the NM log starts with time flag: "Jul 07, 12:01"
Created attachment 1177840 [details] [PATCH] dhcp: don't set permanent lifetime for addresses (In reply to Joachim Backes from comment #3) > The import part in the NM log starts with time flag: "Jul 07, 12:01" The DHCP returns a infinite lease and thus the address is added with "forever" lifetime. Then when NM is restarted it fails to recognize that the DHCP connection was active on the device due to the permanent address. I think a fix for this would be to avoid setting permanent addresses for DHCP connections and use the maximum value instead, as per attached patch.
patch lgtm. Anyway, i wonder if we should deal with this in IPv6 too with something like: --- a/src/dhcp-manager/nm-dhcp-systemd.c +++ b/src/dhcp-manager/nm-dhcp-systemd.c @@ -737,6 +737,9 @@ lease_to_ip6_config (const char *iface, /* Addresses */ sd_dhcp6_lease_reset_address_iter (lease); while (sd_dhcp6_lease_get_address (lease, &tmp_addr, &lft_pref, &lft_valid) >= 0) { + if (lft_valid == NM_PLATFORM_LIFETIME_PERMANENT) + lft_valid--; + NMPlatformIP6Address address = { .plen = 128, .address = tmp_addr, diff --git a/src/dhcp-manager/nm-dhcp-utils.c b/src/dhcp-manager/nm-dhcp-utils.c index 3c397ce..a36e9c1 100644 --- a/src/dhcp-manager/nm-dhcp-utils.c +++ b/src/dhcp-manager/nm-dhcp-utils.c @@ -624,6 +624,8 @@ nm_dhcp_utils_ip6_config_from_options (int ifindex, str = g_hash_table_lookup (options, "max_life"); if (str) { address.lifetime = strtoul (str, NULL, 10); + if (address.lifetime == NM_PLATFORM_LIFETIME_PERMANENT) + address.lifetime = NM_PLATFORM_LIFETIME_PERMANENT - 1; nm_log_info (LOGD_DHCP6, " valid_lft %u", address.lifetime); }