From ca861152b58a9cc52a76bc7bf60e243d3138113e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 7 Jul 2015 16:54:05 +0200 Subject: [PATCH] settings: get_plugin() should return plugin that has all requested capabilities This bug had no real consequences because we only called get_plugin() with one capability at a time. (cherry picked from commit 08b99eea10500e9418d619c531de87864069c1e2) --- src/settings/nm-settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index cb3b6b4386..4d7d697da8 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -505,7 +505,7 @@ get_plugin (NMSettings *self, guint32 capability) NMSystemConfigInterfaceCapabilities caps = NM_SYSTEM_CONFIG_INTERFACE_CAP_NONE; g_object_get (G_OBJECT (iter->data), NM_SYSTEM_CONFIG_INTERFACE_CAPABILITIES, &caps, NULL); - if (caps & capability) + if (NM_FLAGS_ALL (caps, capability)) return NM_SYSTEM_CONFIG_INTERFACE (iter->data); }