mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 11:08:03 +02: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') (cherry picked from commit8dd18d91b2)
This commit is contained in:
parent
42fa77a3ed
commit
c543c7f9d7
1 changed files with 1 additions and 1 deletions
|
|
@ -7951,6 +7951,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,
|
||||
|
|
@ -7972,7 +7973,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