[PATCH 1/1] Call __connman_technology_add_interface() after rtnl->newlink()

martin.xu at intel.com martin.xu at intel.com
Thu Jan 27 03:32:33 PST 2011


From: Martin Xu <martin.xu at intel.com>

Device is created and attached technology at rtnl->newlink(), so
__connman_technology_add_interface() needs to be called after
rtnl->newlink()
---
 src/rtnl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/rtnl.c b/src/rtnl.c
index 3d42043..d9da1fa 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -462,9 +462,6 @@ static void process_newlink(unsigned short type, int index, unsigned flags,
 
 		if (type == ARPHRD_ETHER)
 			read_uevent(interface);
-
-		__connman_technology_add_interface(interface->service_type,
-			interface->index, interface->name, interface->ident);
 	}
 
 	for (list = rtnl_list; list; list = list->next) {
@@ -474,6 +471,9 @@ static void process_newlink(unsigned short type, int index, unsigned flags,
 			rtnl->newlink(type, index, flags, change);
 	}
 
+	__connman_technology_add_interface(interface->service_type,
+			interface->index, interface->name, interface->ident);
+
 	for (list = watch_list; list; list = list->next) {
 		struct watch_data *watch = list->data;
 
-- 
1.6.1.3




More information about the connman mailing list