nm-netns: skip nodev routes in platform signal callback

Platform signal callback could be trigger by nodev routes and they do
not have an ifindex. Skip the l3cfg notification for nodev routes.
This commit is contained in:
Fernando Fernandez Mancera 2022-12-15 17:17:38 +01:00
parent 6ea924fa74
commit c177cf8fdd

View file

@ -230,6 +230,11 @@ _platform_signal_cb(NMPlatform *platform,
const NMPlatformSignalChangeType change_type = change_type_i;
L3CfgData *l3cfg_data;
if (ifindex <= 0) {
/* platform signal callback could be triggered by nodev routes, skip them */
return;
}
l3cfg_data = g_hash_table_lookup(priv->l3cfgs, &ifindex);
if (!l3cfg_data)
return;