Commit Graph

7740 Commits

Author SHA1 Message Date
Thomas Graf
40164fbc1f ethernet: move all connection <-> device matching into a single function
Moves all code to match an ethernet connection into a single function
match_ethernet_connection() and use it from everywhere within
NMDeviceEthernet.

Use of match_ethernet_connection() in connection_match_config() enables
bondig connections to be successfully matched with configurations with
matching interface names.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-08 10:32:51 -06:00
Thomas Graf
3bdd2d7429 ethernet: check kernel interface binding when matching config
When matching an ethernet device with connection settings, check if
the connection needs to be bound to a specific virtual kernel interface.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-08 10:12:29 -06:00
Thomas Graf
1cd8d52061 bonding: add nm_connection_get_virtual_iface_name() to abstract kernel interface binding
Some connection types such as bonding, bridging and VLAN require
specific virtual kernel interfaces identified by name to be auto
connected to the connection.

The function nm_connection_get_virtual_iface_name() returns the name
of the kernel interface if the connection type requires this
functionatlity.

Each connection base type settings class can implement the function
get_virtual_iface_name() if the connection needs to be auto connected
to a specific kernel interface.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-08 09:56:47 -06:00
Jiří Klimeš
b366ebe321 examples: add some examples in shell 2011-12-08 16:36:37 +01:00
Guido Günther
6dcd9114cb ifupdown: add testcase to verify parsing into NMConnection 2011-12-07 17:58:44 -06:00
Guido Günther
e4fbf5363e ifupdown: support dns-search entries
as used by resolvconf and openresolv.
2011-12-07 17:58:24 -06:00
Jiří Klimeš
fdec6acff3 trivial: fix comment 2011-12-07 10:42:17 +01:00
Dan Williams
dff0d2a189 core: ensure correct IP family completion is scheduled
The callers of fw_add_to_zone() were passing an 'int' (AF_INET or
AF_INET6) while that function was expecting a boolean.  Thus when
IPv6 functions passed AF_INET6 that would be interpreted as TRUE
and IPv4 operations would be scheduled.
2011-12-06 17:31:46 -06:00
Dan Williams
768d54bcc6 core: use right IP family when commiting IP configuration
IPv6 needs to clear it's own activation chain, not IPv4's.
2011-12-06 17:17:34 -06:00
Dan Williams
469b263043 core: better failure handling when starting IP configuration
First, log when there's an unhandled IP config method, and
second, assume failure in IPv4 configs.  IPv6 already did.
2011-12-06 17:00:40 -06:00
Dan Williams
b2eaf7228e firewall: add firewall log domain and use it in firewall code 2011-12-06 16:51:17 -06:00
Dan Williams
4fd510cbcd trivial: move some log messages earlier
Would have been helpful to more easily catch a bug cyphermox and
I were discussion on IRC.
2011-12-06 16:36:37 -06:00
Dan Williams
ce9d8a68d7 policy: recheck activation after connection retries are cleared
After any connection has had its retries cleared, schedule an
activation check so that we can possibly use that connection
again.
2011-12-06 16:33:00 -06:00
Thomas Graf
18088e0d07 trivial: add nm_device_get_connection()
Shortcut to access the connection linked to the activation
request of a device.

The patch only replaces usage with nm_device_get_connection()
if the existing code assumes that an activation request must
be available.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-06 16:10:23 -06:00
Thomas Graf
86d5a40677 libnm-util: add nm_connection_get_setting_serial()
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-06 16:08:39 -06:00
Thomas Graf
5b7503e95e core: use nm_connection_get_setting_<type>() whenever possible
Leads to shorter, easier to read code and improves type casting safety.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-06 16:06:43 -06:00
Dan Williams
c1344ec097 trivial: small cleanup checking error 2011-12-05 12:14:40 -06:00
Dan Williams
2ade420479 netlink: consolidate netlink monitor error handling and initialization
The fact that any of this code was in main.c was a hangover from
a long time ago and it should really go with the rest of the
netlink monitor code.
2011-12-03 17:38:07 -06:00
Dan Williams
33ae7cf518 trivial: fix comment 2011-12-03 15:33:18 -06:00
Dan Williams
a5de613d67 release: update NEWS 2011-12-02 13:56:03 -06:00
Dan Williams
2099459794 core: add device factory infrastructure and make WiMAX a plugin
This allows us to package WiMAX separately so you can choose
to install WiMAX or not.  For package-based distros you can now
install libnm-device-plugin-wimax.so in a separate package that
links to/requires the Intel WiMAX service instead of having the
main NM package require it and pull it in by default.  This
plugin infrastructure will be extended to other device types
as well.
2011-12-02 13:30:08 -06:00
Dan Williams
21fab21ec0 trivial: remove some unused includes 2011-12-02 13:30:08 -06:00
Dan Williams
c71b032d7a core: clean up more usage of NM_IS_DEVICE_xxx()
One more step on the way to modular WiMAX and other device types.
2011-12-02 13:30:08 -06:00
Dan Williams
edefc552fd core: clarify non-modem device addition handling 2011-12-02 13:30:08 -06:00
Dan Williams
8e53a44cdd core: clean up per-device rfkill handling
Add an accessor for device rfkill type and use that instead of
GObject properties, and also use that accessor when claiming a
new device instead of checking NM_IS_DEVICE_xxxx().  Allows us
to move one step closer to making WiMAX a plugin.
2011-12-02 13:30:08 -06:00
Dan Williams
da8e21a7d7 core: kill NMDeviceInterface 2011-12-02 13:30:07 -06:00
Dan Williams
6d567e71e6 core: move NMDeviceInterface properties and methods to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
296b488ad4 core: move state-changed signal to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
905f2cdf9a core: move NMDeviceInterfaceError to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
2b1708865f core: move nm_device_interface_deactivate() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
3caf0c80e4 core: move nm_device_interface_activate() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
dcce47bea6 core: move nm_device_interface_disconnect() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
827d9defb9 core: move nm_device_interface_set_enabled() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
51c25508c2 core: move nm_device_interface_get_enabled() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
c71656ff07 core: move nm_device_interface_spec_match_list() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
2db920659f core: move nm_device_interface_connection_match_config() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
1287c8e18d core: move nm_device_interface_can_assume_connections() to nm-device.c 2011-12-02 13:30:07 -06:00
Dan Williams
4f330838bd core: move nm_device_interface_check_connection_compatible() to nm-device.c 2011-12-02 13:30:06 -06:00
Dan Williams
777d9cb182 core: kill IS_ACTIVATING_STATE() 2011-12-02 13:30:06 -06:00
Dan Williams
f8852bf4a4 core: kill nm_device_interface_get_state() 2011-12-02 13:30:06 -06:00
Dan Williams
e5c1a0ed13 core: move NMDevice private functions to nm-device-private.h
Move stuff that's not "public" API of NMDevice to the private
header that's only used by subclasses.
2011-12-02 13:30:06 -06:00
Dan Williams
396ae5940a po: add translatable 2011-12-02 13:09:16 -06:00
Dan Williams
8a16af2bd8 keyfile: add support for Infiniband connections 2011-12-02 13:09:16 -06:00
Dan Williams
1f8090fb58 libnm-util: add nm_utils_hwaddr_type()
Returns the address type given the length.
2011-12-02 13:09:16 -06:00
Dan Williams
6e4eb4902e libnm-util: fix nm_utils_hwaddr_aton() for input with no leading zeros
ether_aton() allows addresses like "0:1:2:3:4:5" which was casusing
some problems when reading connections after switching callers of
ether_aton() to nm_utils_hwaddr_aton().
2011-12-02 13:09:16 -06:00
Dan Winship
f49e88efe0 nmcli: add Infiniband support 2011-12-02 13:09:16 -06:00
Dan Winship
e9cd59b654 libnm-glib: add NMDeviceInfiniband 2011-12-02 13:09:16 -06:00
Dan Winship
5366c3d6d4 wired: split NMDeviceWired out of NMDeviceEthernet and add NMDeviceInfiniband 2011-12-02 13:09:16 -06:00
Dan Winship
730f034a6c ifcfg-rh: add support for infiniband 2011-12-02 13:09:16 -06:00
Dan Winship
d96bf9e866 libnm-util: add NMSettingInfiniband 2011-12-02 13:09:16 -06:00