Commit graph

6318 commits

Author SHA1 Message Date
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
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
Marek Černocký
b9ceba6133 cz: update Czech translation (bgo #664736) 2011-11-30 15:56:32 +01:00
Jiří Klimeš
77ef5e8676 examples: add a few examples in ruby 2011-11-29 16:20:04 +01:00
Jiří Klimeš
576acdd2bf libnm-glib: get access points in constructor to prevent D-Bus errors
The errors appeared due to calling GetAccessPoints() on removed devices:
nm_device_wifi_get_access_points: error getting access points: Method "GetAccessPoints" with signature "" on interface "org.freedesktop.NetworkManager.Device.Wireless" doesn't exist
2011-11-24 17:15:39 +01:00
Jiří Klimeš
42060fdd89 libnm-glib: get devices and their properties in constructor (NMClient, NMDevice)
NMClient and NMDevice used a 'lazy' approach for getting stuff from D-Bus, i.e.
requesting data from NM when they are asked for. However, for some cases, like
removing devices it is not optimal. libnm-glib will never see a device that was
removed, but not added during NMClient's lifetime.

So let's get devices list in NMClient's constructor and device properties
in NMDevice constructor to have the data from the beginning.
2011-11-24 17:15:36 +01:00
Jiří Klimeš
43b3466b14 libnm-glib: fix demarshalling of ActiveConnection property in NMDevice 2011-11-24 14:11:52 +01: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
dc92d1258d settings: Add new password-raw and password-raw-flags properties to 8021x.
In cases where the actual password is non-ASCII, it may not be
possible to deliver the 802.1x password as a D-Bus string. Instead
provide an alternate field holding the password as a byte array.

In cases where both a password and password-raw are supplied,
password is preferred.
2011-11-21 23:50:48 -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
Matej Urbančič
3ea9ce66c2 sl: update Slovenian translation (bgo #664372) 2011-11-21 10:30:50 +01: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