From b6637b20538fa52ff325db770ffea910012d6902 Mon Sep 17 00:00:00 2001
From: Alexander Sack <asac@ubuntu.com>
Date: Thu, 20 Aug 2009 20:58:18 +0200
Subject: [PATCH] core: make sure device interfaces are up before ip4 configuration

---
 src/nm-device.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/nm-device.c b/src/nm-device.c
index 209ce47..7d0d905 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -996,6 +996,10 @@ real_act_stage3_ip4_config_start (NMDevice *self, NMDeviceStateReason *reason)
 	/* Use the IP interface (not the control interface) for IP stuff */
 	ip_iface = nm_device_get_ip_iface (self);
 
+	/* Make sure the interface is up before trying to do anything with it */
+	if (!nm_system_device_is_up_with_iface (ip_iface))
+		nm_system_device_set_up_down_with_iface (ip_iface, TRUE, NULL);
+
 	req = nm_device_get_act_request (self);
 	connection = nm_act_request_get_connection (req);
 	s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
-- 
1.6.3.3

