summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-03-17 10:06:21 +0100
committerThomas Haller <thaller@redhat.com>2022-03-17 10:10:22 +0100
commit593d08db81f2c52ddd7bde6c1b4381f9fbfef875 (patch)
tree34eb0df986ae4a54bb836c8533cbc1769e4d3239
parent118561e284ff7f28421b19530d4471075b89645c (diff)
connectivity: skip unexpected addr family from resolved response
In practice, systemd-resolved will give us always AF_INET/AF_INET6. Still, check for that.
-rw-r--r--src/core/nm-connectivity.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c
index eee837be17..c08ee62c1a 100644
--- a/src/core/nm-connectivity.c
+++ b/src/core/nm-connectivity.c
@@ -738,6 +738,9 @@ resolve_cb(GObject *object, GAsyncResult *res, gpointer user_data)
g_variant_get_child(addresses, i, "(ii@ay)", &ifindex, &addr_family, &address);
+ if (!NM_IN_SET(addr_family, AF_INET, AF_INET6))
+ continue;
+
if (cb_data->addr_family != AF_UNSPEC && cb_data->addr_family != addr_family)
continue;