Hi,

I'm using an udev rule to rename network interfaces on my device. If a
particular interface is plugged before connman is started, the new name
will be used but if it is plugged after, connman will still use the old
name.

My gut feeling is that it looks racy; Do you think this renaming is
just cosmetic (i.e. test/list-services showing the old name) or could
it triggers bugs ?

I tried to write a small patch to have connman pick up the new name.
Right now, all it does is break ofono's ability to activate a context
(I'm renaming a 3G modem network interface).

I'll reply with the patch and below is the log when the interface is
plugged (hso0 -> gsm0) :

2010-12-20_01:16:41.57833 daemon.debug: connmand[1106]: 
src/rtnl.c:rtnl_message() buf 0xbfe34694 len 412
2010-12-20_01:16:41.57852 daemon.debug: connmand[1106]: 
src/rtnl.c:rtnl_message() NEWLINK len 412 type 16 flags 0x0000 seq 0
2010-12-20_01:16:41.57867 daemon.debug: connmand[1106]: 
src/ipconfig.c:__connman_ipconfig_newlink() index 9
2010-12-20_01:16:41.57891 daemon.info: connmand[1106]: hso0 {create} index 9 
type 65534 <NONE>
2010-12-20_01:16:41.57898 daemon.info: connmand[1106]: hso0 {update} flags 4240 
<DOWN>
2010-12-20_01:16:41.57903 daemon.info: connmand[1106]: hso0 {newlink} index 9 
operstate 2 <DOWN>
2010-12-20_01:16:41.57906 daemon.debug: connmand[1106]: 
src/detect.c:detect_newlink() type 65534 index 9
2010-12-20_01:16:41.57911 daemon.debug: connmand[1106]: 
src/rfkill.c:rfkill_process() 
2010-12-20_01:16:41.57922 daemon.debug: connmand[1106]: 
src/rfkill.c:rfkill_process() idx 2 type 5 op 0 soft 0 hard 0
2010-12-20_01:16:41.57928 daemon.debug: connmand[1106]: 
src/technology.c:__connman_technology_add_rfkill() index 2 type 6 soft 0 hard 0
2010-12-20_01:16:41.57933 daemon.debug: connmand[1106]: 
src/technology.c:technology_get() type 6
2010-12-20_01:16:41.57940 daemon.debug: connmand[1106]: 
src/technology.c:technology_find() type 6
2010-12-20_01:16:41.57952 daemon.debug: connmand[1106]: 
src/technology.c:technology_get() technology 0x8c85c60
2010-12-20_01:16:41.57957 daemon.debug: connmand[1106]: 
src/technology.c:technology_put() technology 0x8c85c60
2010-12-20_01:16:41.58077 daemon.debug: connmand[1106]: 
src/rfkill.c:rfkill_process() 
2010-12-20_01:16:41.58103 daemon.debug: connmand[1106]: 
src/rfkill.c:rfkill_process() idx 2 type 5 op 2 soft 0 hard 0
2010-12-20_01:16:41.58106 daemon.debug: connmand[1106]: 
src/technology.c:__connman_technology_update_rfkill() index 2 soft 0 hard 0
2010-12-20_01:16:41.64368 daemon.debug: connmand[1106]: 
src/rtnl.c:rtnl_message() buf 0xbfe34694 len 412
2010-12-20_01:16:41.64373 daemon.debug: connmand[1106]: 
src/rtnl.c:rtnl_message() NEWLINK len 412 type 16 flags 0x0000 seq 0
2010-12-20_01:16:41.64376 daemon.debug: connmand[1106]: 
src/ipconfig.c:__connman_ipconfig_newlink() index 9
2010-12-20_01:16:41.64378 daemon.info: connmand[1106]: gsm0 {newlink} index 9 
operstate 2 <DOWN>
2010-12-20_01:16:41.64380 daemon.debug: connmand[1106]: 
src/rtnl.c:process_newlink() hso0 renamed to gsm0 index 9
2010-12-20_01:16:41.64382 daemon.debug: connmand[1106]: 
src/detect.c:detect_newlink() type 65534 index 9

--
Cheers
Benoît.
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to