diff options
| author | Michael Biebl <biebl@debian.org> | 2022-05-13 15:12:23 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-05-13 15:12:23 +0200 |
| commit | 84afb2ff5f7405ec3b98bbe627cd071105626087 (patch) | |
| tree | fc82d122eda3fede7ace3026a09af018e1af3174 /src/core/dhcp/nm-dhcp-utils.c | |
| parent | d26308b229deb999da934f582aa8f3d5caaa63c0 (diff) | |
| parent | 87d61411bb3453587d21487da04fcf770fee7d55 (diff) | |
Update upstream source from tag 'upstream/1.38.0'
Update to upstream version '1.38.0' with Debian dir fb301733063d70b26e8eff5a4877a6a4f0bcddc2
Diffstat (limited to 'src/core/dhcp/nm-dhcp-utils.c')
| -rw-r--r-- | src/core/dhcp/nm-dhcp-utils.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/dhcp/nm-dhcp-utils.c b/src/core/dhcp/nm-dhcp-utils.c index a0eec6e0..081e2841 100644 --- a/src/core/dhcp/nm-dhcp-utils.c +++ b/src/core/dhcp/nm-dhcp-utils.c @@ -669,8 +669,13 @@ nm_dhcp_utils_ip6_config_from_options(NMDedupMultiIndex *multi_idx, _LOG2I(LOGD_DHCP6, iface, " preferred_lft %u", address.preferred); } - str = g_hash_table_lookup(options, "ip6_address"); - if (str) { + if (!info_only) { + str = g_hash_table_lookup(options, "ip6_address"); + if (!str) { + /* No address in Managed mode is a hard error */ + return NULL; + } + if (!inet_pton(AF_INET6, str, &tmp_addr)) { _LOG2W(LOGD_DHCP6, iface, "(%s): DHCP returned invalid address '%s'", iface, str); return NULL; @@ -680,9 +685,6 @@ nm_dhcp_utils_ip6_config_from_options(NMDedupMultiIndex *multi_idx, address.addr_source = NM_IP_CONFIG_SOURCE_DHCP; nm_l3_config_data_add_address_6(l3cd, &address); _LOG2I(LOGD_DHCP6, iface, " address %s", str); - } else if (info_only == FALSE) { - /* No address in Managed mode is a hard error */ - return NULL; } str = g_hash_table_lookup(options, "host_name"); |