diff options
author | Thomas Haller <thaller@redhat.com> | 2022-03-07 08:42:06 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-03-07 09:11:07 +0100 |
commit | 5402a7217964205aa6041324fa0fd393bfbb4838 (patch) | |
tree | a300020f28c0c0bb150e2ff7ac782af3a6e482a8 | |
parent | 8384afa8754fcd5e8432e3a1ac1da4493c3776f8 (diff) | |
download | NetworkManager-5402a7217964205aa6041324fa0fd393bfbb4838.tar.gz |
dhcp6: fix setting ifindex in nm_dhcp_utils_merge_new_dhcp6_lease()
nm_l3_config_data_new_clone() takes non-positive ifindex to use
the ifindex of the l3cd. But it also asserts that the ifindex
is not negative. Fix that assertion failure, by setting the ifindex
to zero.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/907
Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration')
-rw-r--r-- | src/core/dhcp/nm-dhcp-utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/dhcp/nm-dhcp-utils.c b/src/core/dhcp/nm-dhcp-utils.c index 4a138086b9..214e94cd08 100644 --- a/src/core/dhcp/nm-dhcp-utils.c +++ b/src/core/dhcp/nm-dhcp-utils.c @@ -876,7 +876,7 @@ nm_dhcp_utils_merge_new_dhcp6_lease(const NML3ConfigData *l3cd_old, * addresses from the same transaction into a single configuration. **/ - l3cd_merged = nm_l3_config_data_new_clone(l3cd_old, -1); + l3cd_merged = nm_l3_config_data_new_clone(l3cd_old, 0); nm_l3_config_data_iter_ip6_address_for_each (&iter, l3cd_new, &addr) nm_l3_config_data_add_address_6(l3cd_merged, addr); |