On 12/08/2012 04:04 AM, Daniel Wagner wrote:
On 08.12.2012 01:15, Peter A. Bigot wrote:
The second alternative also requires a way to tell connman that a wired
interface is to be enabled but not autoconfigured.  I haven't found
anything to do that.  The documentation (config-format.txt) suggests
that only wifi interfaces support config files.  Adding
"AutoConnect=false" to the wired section of /var/lib/connman/settings
had no effect; connman still brought eth0 up.
Unfortunately, the AutoConnect setting is per device and stored under
/var/lib/connman/ethernet_MAC_ADDR_cable/settings.
Is external manipulation of that file (including installing it at the time a system is provisioned) consistent with how connman configuration is to be done, or do you expect all such changes to come through the dbus interface?

How would this be done if I wanted to statically assign network
configuration data to an interface that had a fixed MAC address? Have
something install /var/lib/connman/ethernet_(macaddr)_cable/settings?
Maybe we could add something to the ethernet plugin which would first
set the MAC and then register the device at the core. Though I don't
know if this is make sense.
I wouldn't ask for that enhancement. I think it would be more generally useful to have a way to tell connman "ignore all interfaces of type (ethernet) for which there isn't an existing (ethernet_MAC_ADDR_cable) configuration". Then it'd fire up automatically once the correct address is assigned externally.

> One thing we would need is to identify this kind of device. I guess
> this can only be done reliable through udev?

/sys/class/net/eth0/addr_assign_type will have the value 1 when the MAC address was assigned randomly if the kernel revision is new enough. I believe that change was done for smsc95xx in July; in earlier releases I'm unaware of any indicator. In OE danny stable version 3.2.28 addr_assign_type is 0 but it's still random. It would probably be worth having connman check that, and have a configuration setting somewhere that told it what to do (go ahead and use it the interface, or ignore it).

Personally I think assigning a random MAC address in the driver is...unwise. I can't imagine having any success getting that changed, though, especially now that addr_assign_type is used properly.

Thanks to all for the answers.

Peter
_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to