GNOME Bugzilla – Bug 699391
move hw-address properties into NMDevice
Last modified: 2013-05-03 17:20:39 UTC
I really didn't want to copy+paste the hw-address property code 6 or 7 more times for the new virtual device types... The basics definitely work, but it will need a little more testing. Notes: - As mentioned in the commit message, this doesn't affect the D-Bus API - This does cause the daemon-side NMDeviceModem to have a :hw-address property now, but it should always be NULL. - It is supposed to preserve the behavior that nm_device_get_hw_address() returns NULL for NMDeviceADSL except when the device is connected - The NMDeviceBond code attempts to correctly deal with the bond device having either an ETH_ALEN or an INFINIBAND_ALEN address
Created attachment 242997 [details] [review] core: reorganize hw-address properties Now that NMDevice reads the hwaddr directly from netlink, it's silly to have every device subtype maintain its own hw-address property (using data that it gets from the NMDevice base class). Remove all the device-specific hw-address properties, and add one to NMDevice instead. (Because of the way nm-properties-changed-signal works, this has no effect on the D-Bus API.) Subclasses now call nm_device_get_hw_address() in places where they used to just refer to priv->hw_addr (and to simplify this, we now allow passing NULL for the out length parameter, since the subclasses almost always know what the length will be already). Also reorganize/simplify a few other methods to take advantage of the fact that NMDevice is now keeping track of the hw-address directly.
oh, also danw/hwaddr branch
Looks good.
Attachment 242997 [details] pushed as 9ce4582 - core: reorganize hw-address properties