From 1fcb9d6de4b70bbfaae344827196bdcf74778d33 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 4 Apr 2013 11:06:39 -0400 Subject: [PATCH] libnm-glib: fix nm_device_check_connection_compatible() Set the GError when nm_device_check_connection_compatible() fails because of interface_name mismatch. --- src/nm-device.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nm-device.c b/src/nm-device.c index b23538a26c..dfd0356b2e 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -1463,8 +1463,12 @@ check_connection_compatible (NMDevice *device, config_iface = nm_setting_connection_get_interface_name (s_con); device_iface = nm_device_get_iface (device); - if (config_iface && strcmp (config_iface, device_iface) != 0) + if (config_iface && strcmp (config_iface, device_iface) != 0) { + g_set_error (error, + NM_DEVICE_ERROR, NM_DEVICE_ERROR_CONNECTION_INVALID, + "The connection is not valid for this interface."); return FALSE; + } return TRUE; }