diff options
| author | Michael Biebl <biebl@debian.org> | 2023-08-09 21:56:59 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-08-09 21:56:59 +0200 |
| commit | b1206f287e4fae1f9a7e29ec0dc11b54d726a7f8 (patch) | |
| tree | cc1d62cd21f10b2375c76484b5e2187f1e75f010 /src/core/nm-connectivity.c | |
| parent | a6d4d07b23485507f30ddb1ce99f5c82428714c8 (diff) | |
| parent | 05e4a733f2141995181a551854d5df929f084adf (diff) | |
Update upstream source from tag 'upstream/1.44.0'
Update to upstream version '1.44.0' with Debian dir e69e19b54914190e7696747b3e0508f95977f387
Diffstat (limited to 'src/core/nm-connectivity.c')
| -rw-r--r-- | src/core/nm-connectivity.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c index aaf9d810..92de44f1 100644 --- a/src/core/nm-connectivity.c +++ b/src/core/nm-connectivity.c @@ -981,9 +981,7 @@ check_platform_config(NMConnectivity *self, return NM_CONNECTIVITY_NONE; } - switch (addr_family) { - case AF_INET: - { + if (NM_IS_IPv4(addr_family)) { const NMPlatformIP4Route *route; gboolean found_global = FALSE; NMDedupMultiIter iter; @@ -1002,13 +1000,8 @@ check_platform_config(NMConnectivity *self, NM_SET_OUT(reason, "no global route configured"); return NM_CONNECTIVITY_LIMITED; } - break; - } - case AF_INET6: + } else { /* Route scopes aren't meaningful for IPv6 so any route is fine. */ - break; - default: - g_return_val_if_reached(FALSE); } NM_SET_OUT(reason, NULL); @@ -1050,11 +1043,12 @@ nm_connectivity_check_start(NMConnectivity *self, cb_data->concheck.con_config = _con_config_ref(priv->con_config); if (iface && ifindex > 0 && priv->enabled && priv->uri_valid) { - gboolean has_systemd_resolved; - NMConnectivityState state; - const char *reason; + gboolean has_systemd_resolved; if (platform) { + const char *reason; + NMConnectivityState state; + state = check_platform_config(self, platform, ifindex, addr_family, &reason); nm_assert((state == NM_CONNECTIVITY_UNKNOWN) == !reason); if (state != NM_CONNECTIVITY_UNKNOWN) { |