Commit Graph

10071 Commits

Author SHA1 Message Date
Thomas Haller
f0fccd99a5 core: add nm_ip[46]_config_replace functions
This new function copies the entire configuration of an existing
NMIP[46]Config object (src) and replaces the configuration in the destination
object (dst) in-place.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 23:12:37 +02:00
Thomas Haller
b1113a0a59 core: add nm_platform_ip[46]_*_cmp functions
New functions to compare two instances of NMPlatformIP4Address, NMPlatformIP6Address,
NMPlatformIP4Route, NMPlatformIP6Route, respectively.

These functions return -1, 0 or 1 as result of the comparison. This is similar to
strcmp with the additional restriction, that only one of these 3 values will be
returned.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 23:12:37 +02:00
Thomas Haller
a7c7b9f5aa trivial: fixup whitespace
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 23:12:37 +02:00
Thomas Haller
a84fc3169a bluez: merge adding support for BlueZ 5 (bgo #701078)
Merge adding support for BlueZ 5. Both BlueZ 4 and 5 still work, but you
have to decide at compile time which version to use. By default BlueZ 5
will be build, use ./configure --enable-bluez4=yes to enable BlueZ 4.

BlueZ 5 currently only works with PAN devices, DUN devices are not yet
supported.

https://bugzilla.gnome.org/show_bug.cgi?id=701078

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 22:59:50 +02:00
Thomas Haller
e0e10a06b2 bluez: remove the device from manager before emitting REMOVED signal
As we iterate through the list of devices that are about to removed,
they should be removed before emitting the signal.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 22:58:04 +02:00
Dan Williams
ef472259cf bluez: fix emitting of REMOVED signal in manager
Ensure, before emitting the REMOVED signal for devices, that the device
was usable before.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 22:57:45 +02:00
Thomas Haller
07cc990981 bluez: ensure that address of NMBluezDevice cannot be reset
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:14:41 +02:00
Dan Williams
050cf2dbae bluez: check bluez5 adapter powered state and remove devices if killed 2013-09-25 21:01:04 +02:00
Dan Williams
961e23a2e2 build: show bluez4 as "no" when not explicitly enabled 2013-09-25 21:01:04 +02:00
Dan Williams
18624eb6dd bluez: combine bluez4 and bluez5 connect/disconnect code
Pretty trivial to combine right now, and use GDBus for everything
here.  No need to stick with dbus-glib for these operations.
2013-09-25 21:01:04 +02:00
Thomas Haller
7ff6b9d29b bluez: rename files from nm-bluez5-* to nm-bluez-*
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
03aeaf7b77 bluez: rename files from nm-bluez-* to nm-bluez4-*
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
b246788bc4 config: make BlueZ 5 default and replace --enable-bluez5 with --enable-bluez4
Build now BlueZ 5 by default and rename the configure flag
--enable-bluez5 to --enable-bluez4.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
cfd4d5209c bluez: do not allow resetting the capabilities of a bluez device
Also freeze gobject notifications while updating proberties.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
57e19288b7 bluez: create NMConnection for PAN devices
Create a new NMConnection for PAN devices if no compatible connection
exists and export it via DBUS. This has the effect of always exposing
any usable PAN-capable device.

https://bugzilla.gnome.org/show_bug.cgi?id=701078

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
98daf270ba core: add add_connection method to NMConnectionProvider
This exposes the functionality of nm_settings_add_connection to the users
of NMConnectionProvider.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
3b12d9ae6e core: add has_connections_loaded method to NMConnectionProvider
This method returns true, if the connections are already loaded (and the
connection_loaded signal already emited).

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
008453e61f bluez: connections must be pre-configured for BlueZ 5 devices
Modify BlueZ 5 device to have the same behaviour as BlueZ 4, i.e. a
pre-configured connection must exist for the device to show up in
NetworkManager's device list.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
dc85b22e0a bluez: take reference for device before creating dbus adapter
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
bda25894ea trivial: rename function nm_bluez_device_call_disconnect to nm_bluez_device_disconnect
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
0cec10c013 bluez: merge file nm-bluez5-device.c into nm-bluez-device.c
The files nm-bluez-device.c and nm-bluez5-device.c are similar.
Merge them together into one file and handle the differences
using #if directives.

This commit does not actually change any functionality. All it does, is
merging the files together and separating the differences with #if#else.

The next commit will further add common functionality, so this
reduces code duplication for now.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
daef45bdc0 bluez: no need to check for valid GError if glib function fails
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
c3e644fbb4 trivial: change nm-bluez*-device.c to be more similar
These two files share much code, so they will be merged
into one file.

As a first step, make some trvial renaming to make the two
files more similar and easier to merge.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Emilio Pozuelo Monfort
1ae5d53354 bluez: add support for BlueZ 5
At this moment we only support one of BlueZ 4 and 5,
which has to be defined at build time.

Patch rewritten by Thomas Haller <thaller@redhat.com>

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Emilio Pozuelo Monfort
1013caba75 bluez: add configure switch for BlueZ 5 2013-09-25 21:01:04 +02:00
Thomas Haller
a26271841c trivial: rename variable and fix whitespace errors
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
816347d3e0 bluez: fail if connect_async is called when already being connected.
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Thomas Haller
ed966c7e3f bluez: pass NMBluetoothCapabilities to nm_bluez_device
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Emilio Pozuelo Monfort
7aa5128b41 bluez: move org.bluez Connection() handling to NMBluezDevice 2013-09-25 21:01:04 +02:00
Thomas Haller
e45fdcfd2d bluez: get rid of connected_id for disconnecting from signal
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Emilio Pozuelo Monfort
4be056f504 bluez: listen to Connected changes through NMBluezDevice 2013-09-25 21:01:03 +02:00
Emilio Pozuelo Monfort
180503eb1a bluez: listen to Connected changes in NMBluezDevice 2013-09-25 21:01:03 +02:00
Emilio Pozuelo Monfort
f422acc9d3 bluez: pass the NMBluezDevice down to the NMDeviceBt
So that the latter can use the former instead of listening
for changes over dbus.
2013-09-25 21:01:03 +02:00
Dan Williams
024f7e10b2 trivial: fix uninitialized bytes in ethtool driver name lookup
If the interface doesn't have an ethtool driver name, then '.driver'
will never be touched and (*drvinfo.driver) will access uninitialized
bytes.
2013-09-25 13:51:03 -05:00
Dan Winship
4959936704 libnm-util, libnm-glib: bump .so versions to be higher than 0.9.8.4's 2013-09-25 10:16:55 -04:00
Thomas Haller
c4e0326c21 core: fix resetting wrong field in nm_ip6_config_reset_addresses
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-24 18:40:06 +02:00
Thomas Haller
661e47311d core: add const qualifier to functions in nm-ip[46]-config
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-24 18:31:34 +02:00
Dan Winship
17607e74a2 infiniband: only check the last 8 bytes when doing hwaddr matches
IPoIB "hardware addresses" are only partly based on the hardware, and
partly based on the InfiniBand configuration. So when checking if a
configuration matches a device, we should only match the fixed part.
2013-09-24 11:54:35 -04:00
Dan Winship
5a39715f2d platform: fix InfiniBand partition handling
Fix infiniband_partition_add() to put the newly-created device into
the link_cache before returning. Fix link_is_software() to recognize
partition devices as software, so that link_get() is willing to return
them even before we get the udev info.
2013-09-24 11:54:34 -04:00
Dan Winship
e1e4740648 cli: recognize InfiniBand partitions as virtual
We don't need to hardcode the kinds of devices that are virtual here;
NMConnection already knows.
2013-09-24 11:54:34 -04:00
Dan Winship
b91d029021 core: short-circuit nm_device_spec_match_list()
If there are no specs, then the device can't match, so don't call the
virtual method (which might do work like building comparison strings
even when the list is empty).
2013-09-24 11:54:34 -04:00
Dan Winship
d20ac49dc9 platform: fix spelling of "announceable" 2013-09-24 11:54:34 -04:00
Jiri Popelka
a20fd994f4 examples: use GLib.MainLoop instead of deprecated GObject.MainLoop in python
jklimes:
made the change for new firewall-zone.py example as well.
2013-09-24 13:33:37 +02:00
Jiří Klimeš
8a04ab9135 examples: group python examples - dbus vs. gi
Move examples using dbus-python ('dbus' module) and GObject introspection into
their own directories.
2013-09-24 12:52:33 +02:00
Jiří Klimeš
217cb5fbca examples: add a python example getting/setting zone property using GI 2013-09-24 12:48:55 +02:00
Jiří Klimeš
2b72214e52 platform: fix a crash when nm_platform_sysctl_get() returns NULL (rh #1010522)
nm_platform_sysctl_get() can return NULL on an error (when file specified by
'path' argument doesn't exist, can't be opened, etc.)

https://bugzilla.redhat.com/show_bug.cgi?id=1010522
2013-09-23 18:28:36 +02:00
Jiří Klimeš
28530239fa platform: fix a memory leak on an error 2013-09-23 18:28:36 +02:00
Noriko Mizumoto
a3f3d76b24 po: updated Japanese (ja) translation (bgo #708631)
https://bugzilla.gnome.org/show_bug.cgi?id=708631

Reported-by: Jiro Matsuzawa <jmatsuzawa@gnome.org>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-23 17:02:56 +02:00
Jiří Klimeš
5471a6c678 ifcfg-rh: if IPv4 is disabled put DNS domains (DOMAIN) into IPv6 (rh #1004866)
The problem is that there is only a single variable in ifcfg file holding dns
domains - DOMAIN. Thus NetworkManager writes both IPv4 and IPv6 dns-search into
it. While reading there is no way to distinguish between IPv4 and IPv6 values,
so the DOMAIN value is read and only put into IPv4 dns-search.

But, when IPv4 is disabled or invalid, the domains got lost. So in such case
we put DOMAIN variable into IPv6 instead.

https://bugzilla.redhat.com/show_bug.cgi?id=1004866
2013-09-23 09:57:37 +02:00
Christian Kirbach
c1ce1b3185 po: updated German (de) translation (bgo #708533)
https://bugzilla.gnome.org/show_bug.cgi?id=708533
2013-09-23 09:23:54 +02:00