summaryrefslogtreecommitdiff
path: root/src/nm-policy.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-11-02 18:48:02 +0100
committerThomas Haller <thaller@redhat.com>2017-11-08 11:45:33 +0100
commitbfe66fb8f410a003f4d2ae05cba9baff798ddbad (patch)
tree90c815fb35264400f319a03e103e8bf54905b432 /src/nm-policy.c
parent45da11f37068059df5d36115d80bebd15fc92188 (diff)
downloadNetworkManager-bfe66fb8f410a003f4d2ae05cba9baff798ddbad.tar.gz
policy: optimize nm_device_can_auto_connect() to not check nm_device_autoconnect_allowed()
Diffstat (limited to 'src/nm-policy.c')
-rw-r--r--src/nm-policy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index f5c72a1dcd..95bf5a03e7 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -1226,6 +1226,9 @@ auto_activate_device (NMPolicy *self,
if (nm_device_get_act_request (device))
return;
+ if (!nm_device_autoconnect_allowed (device))
+ return;
+
connections = nm_manager_get_activatable_connections (priv->manager, &len, TRUE);
if (!connections[0])
return;