about summary refs log tree commit diff
path: root/src/devices/nm-device-vlan.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-12-24 00:25:15 +0100
committerMichael Biebl <biebl@debian.org>2015-12-24 00:25:15 +0100
commit95fc418c29eaf71c43ee0dddc4515580b9ec1461 (patch)
treec785190da048e63173bd573d7e8c565f3d28488d /src/devices/nm-device-vlan.c
parent46654959ce8acc3b92a92e931920365c3b2dab0d (diff)
parent54f6333410ffd570e62717d9e77c5c987175e397 (diff)
Merge tag 'upstream/1.0.10'
Upstream version 1.0.10
Diffstat (limited to 'src/devices/nm-device-vlan.c')
-rw-r--r--src/devices/nm-device-vlan.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c
index b330397f..7cce6593 100644
--- a/src/devices/nm-device-vlan.c
+++ b/src/devices/nm-device-vlan.c
@@ -96,7 +96,7 @@ parent_hwaddr_changed (NMDevice *parent,
 	NMDeviceVlan *self = NM_DEVICE_VLAN (user_data);
 	NMConnection *connection;
 	NMSettingWired *s_wired;
-	const char *cloned_mac = NULL;
+	const char *cloned_mac = NULL, *new_mac;
 
 	/* Never touch assumed devices */
 	if (nm_device_uses_assumed_connection (self))
@@ -112,9 +112,13 @@ parent_hwaddr_changed (NMDevice *parent,
 		cloned_mac = nm_setting_wired_get_cloned_mac_address (s_wired);
 
 	if (!cloned_mac) {
-		_LOGD (LOGD_VLAN, "parent hardware address changed");
-		nm_device_set_hw_addr (self, nm_device_get_hw_address (parent),
-		                       "set", LOGD_VLAN);
+		new_mac = nm_device_get_hw_address (parent);
+		_LOGD (LOGD_VLAN, "parent hardware address changed to %s%s%s",
+		       NM_PRINT_FMT_QUOTE_STRING (new_mac));
+		if (new_mac) {
+			nm_device_set_hw_addr (self, nm_device_get_hw_address (parent),
+			                       "set", LOGD_VLAN);
+		}
 	}
 }