summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-02-23 10:58:32 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2017-02-23 10:58:32 +0100
commitfcb0fffb85bd4cb7486227167f2150bed309bf99 (patch)
tree07cf74a7ca3f2c0c9c93a6784ce41cf3c2c020f4
parent36bb22f598b6b25503041bcbc283aa21510f3754 (diff)
downloadNetworkManager-fcb0fffb85bd4cb7486227167f2150bed309bf99.tar.gz
libnm-core: require interface name for dummy connections
Fixes: 1bf2d3b0495ce56132e601f6d68f403c99889739
-rw-r--r--libnm-core/nm-setting-dummy.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libnm-core/nm-setting-dummy.c b/libnm-core/nm-setting-dummy.c
index 0934e963ba..d23f0a3054 100644
--- a/libnm-core/nm-setting-dummy.c
+++ b/libnm-core/nm-setting-dummy.c
@@ -21,6 +21,8 @@
#include "nm-default.h"
#include "nm-setting-dummy.h"
+
+#include "nm-connection-private.h"
#include "nm-setting-connection.h"
#include "nm-setting-private.h"
@@ -51,6 +53,15 @@ nm_setting_dummy_new (void)
return (NMSetting *) g_object_new (NM_TYPE_SETTING_DUMMY, NULL);
}
+static gboolean
+verify (NMSetting *setting, NMConnection *connection, GError **error)
+{
+ if (!_nm_connection_verify_required_interface_name (connection, error))
+ return FALSE;
+
+ return TRUE;
+}
+
static void
nm_setting_dummy_init (NMSettingDummy *setting)
{
@@ -59,4 +70,7 @@ nm_setting_dummy_init (NMSettingDummy *setting)
static void
nm_setting_dummy_class_init (NMSettingDummyClass *setting_class)
{
+ NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class);
+
+ parent_class->verify = verify;
}