mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 12:38:10 +02:00
macsec: fix tracking of parent ifindex
For MACsec interfaces, kernel announces the parent ifindex in the generic IFLA_LINK netlink attribute, which we save in NMPlatformLink.parent. There is no need to have a dedicate member in NMPlatformLnkMacsec. The dedicate member was never set and during a restart of NetworkManager the parent of the MACsec device could be unset leading to a failed assertion: act_stage2_config: assertion 'parent' failed Fixes:85103656e9('platform: add support for macsec links') https://bugzilla.redhat.com/show_bug.cgi?id=2122564 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1481 (cherry picked from commitcf11884a85) (cherry picked from commitfe42644fcd)
This commit is contained in:
parent
69e66102ce
commit
54c1d321ac
3 changed files with 1 additions and 5 deletions
|
|
@ -187,8 +187,7 @@ update_properties(NMDevice *device)
|
||||||
|
|
||||||
g_object_freeze_notify((GObject *) device);
|
g_object_freeze_notify((GObject *) device);
|
||||||
|
|
||||||
if (priv->props.parent_ifindex != props->parent_ifindex)
|
nm_device_parent_set_ifindex(device, plink->parent);
|
||||||
nm_device_parent_set_ifindex(device, props->parent_ifindex);
|
|
||||||
|
|
||||||
#define CHECK_PROPERTY_CHANGED(field, prop) \
|
#define CHECK_PROPERTY_CHANGED(field, prop) \
|
||||||
G_STMT_START \
|
G_STMT_START \
|
||||||
|
|
|
||||||
|
|
@ -7822,7 +7822,6 @@ void
|
||||||
nm_platform_lnk_macsec_hash_update(const NMPlatformLnkMacsec *obj, NMHashState *h)
|
nm_platform_lnk_macsec_hash_update(const NMPlatformLnkMacsec *obj, NMHashState *h)
|
||||||
{
|
{
|
||||||
nm_hash_update_vals(h,
|
nm_hash_update_vals(h,
|
||||||
obj->parent_ifindex,
|
|
||||||
obj->sci,
|
obj->sci,
|
||||||
obj->cipher_suite,
|
obj->cipher_suite,
|
||||||
obj->window,
|
obj->window,
|
||||||
|
|
@ -7842,7 +7841,6 @@ int
|
||||||
nm_platform_lnk_macsec_cmp(const NMPlatformLnkMacsec *a, const NMPlatformLnkMacsec *b)
|
nm_platform_lnk_macsec_cmp(const NMPlatformLnkMacsec *a, const NMPlatformLnkMacsec *b)
|
||||||
{
|
{
|
||||||
NM_CMP_SELF(a, b);
|
NM_CMP_SELF(a, b);
|
||||||
NM_CMP_FIELD(a, b, parent_ifindex);
|
|
||||||
NM_CMP_FIELD(a, b, sci);
|
NM_CMP_FIELD(a, b, sci);
|
||||||
NM_CMP_FIELD(a, b, icv_length);
|
NM_CMP_FIELD(a, b, icv_length);
|
||||||
NM_CMP_FIELD(a, b, cipher_suite);
|
NM_CMP_FIELD(a, b, cipher_suite);
|
||||||
|
|
|
||||||
|
|
@ -923,7 +923,6 @@ typedef struct {
|
||||||
} NMPlatformLnkIpIp;
|
} NMPlatformLnkIpIp;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int parent_ifindex;
|
|
||||||
guint64 sci; /* host byte order */
|
guint64 sci; /* host byte order */
|
||||||
guint64 cipher_suite;
|
guint64 cipher_suite;
|
||||||
guint32 window;
|
guint32 window;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue