mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-28 00:30:36 +01:00
platform: simplify loop for IPv6 addresses in nm_platform_ip_address_sync()
(cherry picked from commit9b930cd962) (cherry picked from commit555891fe8d)
This commit is contained in:
parent
1188942c75
commit
fdc4207ab1
1 changed files with 3 additions and 4 deletions
|
|
@ -4262,7 +4262,6 @@ nm_platform_ip_address_sync(NMPlatform *self,
|
|||
}
|
||||
|
||||
if (!delete_remaining_addrs) {
|
||||
delete_remaining_addrs = TRUE;
|
||||
while (i_know > 0) {
|
||||
const NMPlatformIP6Address *know_addr =
|
||||
NMP_OBJECT_CAST_IP6_ADDRESS(known_addresses->pdata[--i_know]);
|
||||
|
|
@ -4277,14 +4276,14 @@ nm_platform_ip_address_sync(NMPlatform *self,
|
|||
|
||||
if (IN6_ARE_ADDR_EQUAL(&plat_addr->address, &know_addr->address)) {
|
||||
/* we have a match. Mark address as handled. */
|
||||
delete_remaining_addrs = FALSE;
|
||||
goto next_plat;
|
||||
}
|
||||
|
||||
/* plat_address has no match. Now delete_remaining_addrs is TRUE and we will
|
||||
* delete all the remaining addresses with cur_scope. */
|
||||
/* "plat_address" has no match. "delete_remaining_addrs" will be set to TRUE and we will
|
||||
* delete all the remaining addresses with "cur_scope". */
|
||||
break;
|
||||
}
|
||||
delete_remaining_addrs = TRUE;
|
||||
}
|
||||
|
||||
g_hash_table_add(_plat_addrs_to_delete_ensure(&plat_addrs_to_delete),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue