Commit graph

2814 commits

Author SHA1 Message Date
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
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
8a16af2bd8 keyfile: add support for Infiniband connections 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 Williams
7ee3abe19b ip6: suppress merge_ip6_configs() warning
NetworkManager[815]: merge_ip6_configs: assertion `src != NULL' failed

Calling ip6_config_merge_and_apply() with a NULL src_config is fine
since that's what happens during RA or DHCP lease changes.

Reported by Johannes Sjölund
2011-12-01 16:19:24 -06:00
Dan Williams
fc7941032f ip6: ensure IPv6 failures take precedence over success
The RDNSS and DNSSL failure cases wouldn't clear out the idle
handler of a previous success (if that success hadn't fired yet);
it seems pointless to signal success and then immediately fail.
Second, it would cause a dangling GSource if the device was
removed or NM quit at the right time.
2011-12-01 16:11:04 -06:00
Gary Ching-Pang Lin
4e1abb8315 core: check the iface index correctly
If the iface name is invalid, the index is -1.
2011-11-30 18:05:51 -06:00
Jiří Klimeš
0dc11be8da trivial: remove unnecessary always-true check 2011-11-22 09:52:42 +01:00
Evan Broder
9fc134ee83 keyfile: Read and write the new 8021x.password-raw field 2011-11-21 23:51:01 -06:00
Evan Broder
b08e2b8932 supplicant: If password field is empty, check password-raw 2011-11-21 23:50:54 -06:00
Evan Broder
2c484fbc77 supplicant: Validate password as a UTF-8 string, not a byte array
The 802.1x password for MS-CHAPv2 can be up to 256 UCS-2 characters,
so we need to validate the password as UTF-8 to make sure we don't
reject valid passwords containing non-ASCII characters
2011-11-21 23:50:46 -06:00
Evan Broder
ef9551bcf3 supplicant: Add a new validation type for UTF-8 strings 2011-11-21 23:50:43 -06:00
Thomas Graf
6346bd60be bonding: wait for master connection to be available
Currently slaves only wait for the master device to be present. This is
insufficient, we want to wait for the master connection to be activated.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-11-21 23:41:36 -06:00
Weiping Pan
0ec51387c0 netlink: use correct preprocessor if format
I only install libnl-3.2.3 on my system, and I met an error:

In file included from ../../src/nm-netlink-monitor.h:93:0,
from nm-vpn-connection.c:48:
../../src/nm-netlink-compat.h:210:5: error: "HAVE_LIBNL1" is not defined
../../src/nm-netlink-compat.h:210:20: error: "HAVE_LIBNL2" is not defined
make[5]: *** [libvpn_manager_la-nm-vpn-connection.lo] Error 1

Signed-off-by: Weiping Pan <wpan@redhat.com>
2011-11-21 15:33:58 -06:00
Dan Williams
e8c6fa8755 trivial: fix wrong return type 2011-11-17 19:04:15 -06:00
Dan Williams
2ea0f3e9c2 backends: clean them up somewhat
Put the two functions they provide into their own header so
places that need them don't have to include nm-system.h.
2011-11-17 18:55:07 -06:00
Dan Williams
9dd270966e ifcfg-rh: revert some bits of a2b1afb1e4
Revert the DEVICE and suffix bits for the connection name; there's
a few problems with this.  It adds the DEVICE value for connections
regardless of what type they, even in cases where it's not hugely
useful (ie basic wired).  We used to do this, but stopped doing it
because it has zero relevance to a large number of users.  Instead,
the UI itself should do this where appropriate.  That probably means
that 'nmcli' and other tools should give more information about
the components of a connection (like a slave device's master) and
GUI tools would show that in detailed connection information but
not in the at-a-glance status or tooltips.  Second, if more
more advanced users wish this information to show up in the name
they can always set the name themselves, or name the ifcfg file
something like "ifcfg-bond1-slave-of-eth0" too.
2011-11-17 18:05:35 -06:00
Evan Broder
9f86b44a52 ifupdown: fix build 2011-11-17 16:24:56 -06:00
Dan Winship
2510c617ec libnm-util: add ether_ntoa/ether_aton-like utility methods
nm_utils_hwaddr_ntoa() and nm_utils_hwaddr_aton() are like
ether_ntoa()/ether_aton(), but handle IPoIB too.

nm_utils_hwaddr_atoba() is like _aton() but returns a GByteArray,
since that's what's wanted in many places.

Also remove nm_ether_ntop() and replace uses of it with
nm_utils_hwaddr_ntoa().
2011-11-17 13:37:08 -06:00
Dan Winship
3dcfd305d6 trivial: three small obvious fixes 2011-11-17 13:25:14 -06:00
Jiří Klimeš
7b7e426b65 settings: pass config file name to settings plugins
Thus plugins will use the correct configuration file, even in case the name
is specified on command line with --config.
2011-11-16 08:56:29 +01:00
Jiří Klimeš
2106d94d08 settings: send agent-owned secrets also for newly created connections
We have to send agent-owned secrets to agents via SaveSecrets() D-Bus call for
newly created connections, the same way we do for connection updates.
Without the change secrets aren't saved for new created VPN connections,
only after a connection update.
2011-11-15 13:43:46 +01:00
Thomas Graf
8509e45f31 wimax: include $(LIBNL_CFLAGS) in CFLAGS because nm-device-wimax.c needs nm-system.c
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-11-14 18:43:25 -06:00