mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-12 05:20:36 +01:00
platform: compare arp_ip_targets_num before arp_ip_target values
We must first check whether a->arp_ip_targets_num and
b->arp_ip_targets_num are identical. Otherwise, this accesses
potentially uninitialized values.
Fixes: f900f7bc2c ('platform: add netlink support for bond link')
This commit is contained in:
parent
ba4a9ea79a
commit
8dd18d91b2
1 changed files with 1 additions and 1 deletions
|
|
@ -8062,6 +8062,7 @@ int
|
|||
nm_platform_lnk_bond_cmp(const NMPlatformLnkBond *a, const NMPlatformLnkBond *b)
|
||||
{
|
||||
NM_CMP_SELF(a, b);
|
||||
NM_CMP_FIELD(a, b, arp_ip_targets_num);
|
||||
NM_CMP_FIELD_MEMCMP_LEN(a,
|
||||
b,
|
||||
arp_ip_target,
|
||||
|
|
@ -8083,7 +8084,6 @@ nm_platform_lnk_bond_cmp(const NMPlatformLnkBond *a, const NMPlatformLnkBond *b)
|
|||
NM_CMP_FIELD_MEMCMP(a, b, ad_actor_system);
|
||||
NM_CMP_FIELD(a, b, ad_select);
|
||||
NM_CMP_FIELD(a, b, all_ports_active);
|
||||
NM_CMP_FIELD(a, b, arp_ip_targets_num);
|
||||
NM_CMP_FIELD(a, b, fail_over_mac);
|
||||
NM_CMP_FIELD(a, b, lacp_rate);
|
||||
NM_CMP_FIELD(a, b, num_grat_arp);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue