Commit Graph

8762 Commits

Author SHA1 Message Date
Guido Günther
72bef29d5d ifupdown: add ifparser_haskey function 2011-12-12 20:10:36 -06:00
Guido Günther
92a3bc9e4c ifupdown: cleanup indentation
and remove unused variables.
2011-12-12 20:09:16 -06:00
Dan Williams
80852aa96a ifnet: make testcases happy
ifnet_plugin_get_conf_file() needs to be defined for the testcases.
2011-12-12 20:07:54 -06:00
Dan Williams
1d0c27590e ifnet: use SYSCONFDIR not /etc 2011-12-12 20:04:25 -06:00
Dan Williams
c579bf95a5 trivial: spacing fixes 2011-12-12 20:02:56 -06:00
Mu Qiao
6d09316b6f ifnet: support writing openrc style 2011-12-12 20:02:00 -06:00
Mu Qiao
76619e4529 ifnet: support reading openrc style
IP configuration like 192.168.1.{2..4} is not supported anymore.
2011-12-12 19:44:03 -06:00
Dan Williams
7735b8d72f dbus: rename conf file to match current conventions 2011-12-12 19:31:11 -06:00
Dan Williams
f03b0ac176 bluetooth: ignore "No such adapter" warnings when bluetooth is inactive 2011-12-12 14:06:22 -06:00
Dan Williams
a868fd5a98 core: don't flush routes/addresses on invalid interface indexes
The NM 'iface' isn't always the IP iface (like for modems) so
to avoid a warning, only flush routes and addresses on deactivate
when the iface can actually handle it.
2011-12-12 14:01:21 -06:00
Dan Williams
f6f8ff1c33 wifi: kill wireless-helper.h
Only used in wifi-utils-wext.c now.
2011-12-12 11:45:54 -06:00
Dan Williams
fbd5c5b0e8 wifi: remove unused wpa.c
With the move to the new wpa_supplicant interface we no longer
have to parse the WPA/RSN IEs ourself.
2011-12-12 11:45:54 -06:00
Jiří Klimeš
bed4d15339 cli: use nm_utils_hwaddr_ntoa() from libnm-util 2011-12-09 13:47:06 +01:00
Jiří Klimeš
607cbffed2 cli: add 'infiniband' setting support 2011-12-09 13:20:36 +01:00
Jiří Klimeš
8962c98539 cli: use nm_connection_get_setting_<type>() to clean up code 2011-12-09 12:04:59 +01:00
Jiří Klimeš
23839887ac examples: add a shell example for listing devices 2011-12-09 10:24:59 +01:00
Dan Williams
2e858619d3 trivial: fix up libnm-util testcases 2011-12-09 00:13:19 -06:00
Thomas Graf
29c9abffa3 bonding: auto activate slaves when a master enters prepare state
Reset the auto retries of all slave connections when their master
connection enter prepare state and schedule all of the slaves
for activation if not pending yet.

Slaves are initially scheduled for activation together with their
master but depending on how long it takes for the master
connection to appear the slave activation requests may already
have run out of attempts. Resetting the retries counter ensures
that all slaves are properly activated when a master is brought up.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-09 00:00:36 -06:00
Dan Williams
fcc441622a core: add generic queued state transitions
There are now three places we need delayed state transitions:

1) unavailable to disconnected
2) failed to disconnected
3) bond unavailable to disconnected

(3) wasn't doing a delayed transition, but we can't change
state from inside a state-change handler otherwise we may not
end up fully processing the current state chagne.  So it needs a
delayed transition too; add some generic code to make that
easier to do.
2011-12-08 11:46:58 -06:00
Thomas Graf
cd0058baa7 bonding: move bonding master state to UNAVAILABLE regardless of carrier state
The carrier of a bonding device is the sum of the carrier state of
all its slaves. The carrier is always off if no slaves have been
attached to the master yet.

Therefore the carrier state is of no interest when making a bonding
connection available but we still want to use carrier detection to
move the connection out of ACTIVATED if the carrier of all slaves
are off.

A neat solution is to always put the bonding master directly into
DISCONNECTED whenever its state is changed to UNAVAILABLE.

This will make a bonding master available for activation immediately
and move it to DISCONNECTED whenever all slaves have been without
a carrier for 4 seconds.

In the future, the move from UNAVAILABLE to DISCONNECTED may be made
dependant on the availability of at least one configured slave.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-08 10:35:49 -06:00
Thomas Graf
916631f15a bonding: abort activation of unknown slave types
Abort activation of slaves which are unknown and log successful
enslave/release.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-08 10:34:35 -06:00
Thomas Graf
200a7e142a wired: allow devices to be reassumed when ip4 config is disabled
Wired connections acting as bonding slave will have their ip4
config disabled. Allow such connections to reassume devices.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-12-08 10:33:21 -06:00
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