Commit graph

12 commits

Author SHA1 Message Date
Dan Winship
feeafb8cf1 core: Update device activation for :carrier-detect
Add a "need_carrier" argument to nm_device_is_available(), to allow
distinguishing between "device is not available", "device is fully
available", and "device is available except for not having carrier".

Adjust various parts of NMDevice and NMManager to allow for the
possibility of activating a connection with :carrier-detect = "no" on
a device with no carrier, and to avoid auto-disconnecting devices with
:carrier-detect = "on-activate".

https://bugzilla.gnome.org/show_bug.cgi?id=688284
2013-02-15 13:40:39 -05:00
Dan Winship
fe307dbd3e core: move carrier-detect NMDeviceState handling into NMDevice
Move some duplicated carrier-handling code into NMDevice (which can
introspect itself to see if it's a subclass that has carrier).

The "mostly ignore carrier" special handling for bridges and bonds is
now also handled as part of the NMDevice-level carrier handling.

https://bugzilla.gnome.org/show_bug.cgi?id=688284
2013-02-15 13:40:38 -05:00
Dan Williams
479163db59 core: generalize waiting for IP config until slaves are ready
Instead of duplicating the code in bridge and bond, move the
logic to the base class and key it off whether or not the device
is a master.
2013-02-04 10:37:47 -06:00
Dan Williams
8ed4b5109a bridge: device availability shouldn't depend on carrier state
The bridge master's carrier follows IFF_UP when no ports are added
and the ports' carrier when ports are added, so we shouldn't
depend on carrier when deciding whether to activate a bridge which
may not have any ports.  Also when the
2013-02-04 10:37:46 -06:00
Dan Williams
e64bcae092 core: add IS_MASTER property to NMDevice
We can't just check whether there are slaves or not, because the
master device may be started before any slaves exist, and the
slaves get added later.
2013-02-04 10:37:46 -06:00
Dan Williams
aa8aeb197f bridge: update log domains for LOGD_BRIDGE 2013-02-04 10:37:46 -06:00
Dan Williams
ce586cc679 core: fix setting port attributes
They need to be written to the "bridge_port" directory, not the
"bridge" directory.
2013-02-04 10:37:45 -06:00
Dan Williams
cd5da9bf88 wired: move hardware address handling back to NMDeviceWired subclasses
The code flow is actually somewhat simpler this way since the
subclasses don't have to ask NMDeviceWired for the address
every time.  Plus then NMDeviceWired doesn't have to know
anything about its subclasses in the constructor.
2013-01-24 14:56:38 -06:00
Dan Williams
445e8755bc bridge: allow independent IPv4 and IPv6 configuration with no slaves
When no slave is present, dynamic IP configuration (DHCPv4, DHCPv6,
IPv6 autoconf) cannot proceed.  But static and link-local
configuration can.  So if IPv4 requires DHCP but IPv6 is static,
it makes no sense to block IPv6 configuration from proceeding
just because DHCPv4 cannot.
2012-11-30 13:21:51 -06:00
Dan Williams
b4a11a86f7 core: rework master/slave handling 2012-11-30 13:21:51 -06:00
Jiří Klimeš
1a7f9e661a core,libnm-glib: expose "slaves" property on NMDeviceBridge 2012-11-30 13:21:51 -06:00
Thomas Graf
cfff5a63d9 bridge: add bridge device type
This adds a new device type 'bridge'. Kernel devices are created
on demand.
2012-11-30 13:21:51 -06:00