From c177cf8fddef0a59a898098e9725428af75ad485 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Thu, 15 Dec 2022 17:17:38 +0100 Subject: [PATCH] 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. --- src/core/nm-netns.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/nm-netns.c b/src/core/nm-netns.c index d14be2cc68..067418a16e 100644 --- a/src/core/nm-netns.c +++ b/src/core/nm-netns.c @@ -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;