settings/ifupdown: fix ifupdown plugin after merging eni_ifaces and connections hashes

The @eni_ifaces hash may now contain %NULL elements. They are only markers
for interface names, but are not actual connections.

They must be skipped.

Fixes: 6aa66426a4

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/124
(cherry picked from commit 5923a30c43)
This commit is contained in:
Thomas Haller 2019-02-15 15:59:32 +01:00
parent e2409b1888
commit b24e169ded

View file

@ -282,8 +282,10 @@ initialize (NMSettingsPlugin *plugin)
g_hash_table_iter_init (&iter, priv->eni_ifaces);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) conn)) {
_nm_settings_plugin_emit_signal_connection_added (NM_SETTINGS_PLUGIN (self),
NM_SETTINGS_CONNECTION (conn));
if (conn) {
_nm_settings_plugin_emit_signal_connection_added (NM_SETTINGS_PLUGIN (self),
NM_SETTINGS_CONNECTION (conn));
}
}
}
}