Commit Graph

8762 Commits

Author SHA1 Message Date
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
Dan Williams
44ccf3454b supplicant: suppress more bus activation failure errors
These are expected errors if the supplicant can't be launched
for some reason.  We should only log entirely unexpected errors
like wrong method arguments or types, really odd failures, etc.

NetworkManager[1312]: <error> [1379601146.148818] [supplicant-manager/nm-supplicant-interface.c:853] interface_add_cb(): (wlan0): error adding interface: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
NetworkManager[1312]: <error> [1379601171.160742] [supplicant-manager/nm-supplicant-interface.c:853] interface_add_cb(): (wlan0): error adding interface: Activation of fi.w1.wpa_supplicant1 timed out
2013-09-19 11:16:47 -05:00
Jiří Klimeš
f8c23077cc cli: fix bond questionnaire to be able to set miimon (rh #1007355)
Bonding options are related and some combinations don't make sense. Basically,
MIIMON and ARP monitoring mode (and related options) are mutually exclusive.
When nmcli set arp_interval of "0" (the default value),
nm_setting_bond_add_option() cleared the MIIMON options (miimon, updelay and
downdelay).

This commit works around libnm-util's nm_setting_bond_add_option() that clears
miimon options when arp_interval is being set and vice versa, but doesn't
take into account the value of "0" that should be regarded as 'disable'.

https://bugzilla.redhat.com/show_bug.cgi?id=1007355
2013-09-19 16:56:37 +02:00
Jiří Klimeš
9dacfd0a39 cli: always print success message (not only in --pretty mode) (rh #1006444)
The commands performing actions without an output only printed a successfull
message for --pretty mode. Some users don't like this silent operation.
This commit makes nmcli print operation success unconditionally. I think that
doesn't hurt; scripts/users can ignore the message if not interested.

https://bugzilla.redhat.com/show_bug.cgi?id=1006444
2013-09-19 15:24:13 +02:00
Jiří Klimeš
05980f9045 cli: fix the error message for valid IPv6 prefix range to <1-128> 2013-09-19 14:06:36 +02:00
Jiří Klimeš
295df3405c cli: accept gateway in the IP questionnaire of 'nmcli -a con add' (rh #1007368)
Also allow leading/trailing white spaces, and more white spaces between IP and
gateway. (Spaces in values and around / are not allowed).
 All of these are accepted:
'  1.2.3.4/11     1.2.3.254 '
' 1.2.3.4 '
'   fe80::215:ff:fe93:ffff/128  ::1 '
...

https://bugzilla.redhat.com/show_bug.cgi?id=1007368
2013-09-19 12:07:22 +02:00
Jiří Klimeš
2e8746aab2 core: remove 'wep40' and 'wep104' from several places in NM
wep40 and wep104 are not valid values for 'pairwise' property and they are not
used for dynamic WEP as 'group' ciphers as well.

See https://bugzilla.redhat.com/show_bug.cgi?id=1005171 for some details.
2013-09-18 12:07:29 +02:00
Piotr Drąg
cd00e3807e po: update Malayalam (ml) translation (bgo #708270)
https://bugzilla.gnome.org/show_bug.cgi?id=708270#c1

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-18 09:21:11 +02:00
Piotr Drąg
7da55019f9 po: update Polish (pl) translation (bgo #708270)
https://bugzilla.gnome.org/show_bug.cgi?id=708270#c0

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-18 09:20:18 +02:00
Jiří Klimeš
76c34d48ed core,settings: do not call functions with connection==NULL (rh #1008151)
check 'req' and 'connection' variables. Apparently, they can be NULL
on some circumstances.

NetworkManager[2830]: <info> (p6p1): device state change: secondaries -> disconnected (reason 'connection-removed') [90 30 38]
NetworkManager[2830]: <info> (p6p1): deactivating device (reason 'connection-removed') [38]
kernel: [ 2623.609111] NetworkManager[2830]: segfault at 50 ip 00007f1a309bf6a1 sp 00007fffc59e67e0 error 6 in NetworkManager[7f1a30915000+104000]
NetworkManager[2830]: (nm-device.c:5043):nm_device_state_changed: runtime check failed: (in_state_changed == FALSE)
NetworkManager[2830]: <info> (p6p1): device state change: disconnected -> failed (reason 'secondary-connection-failed') [30 120 54]
NetworkManager[2830]: nm_act_request_get_connection: assertion `NM_IS_ACT_REQUEST (req)' failed
NetworkManager[2830]: nm_connection_get_id: assertion `connection != NULL' failed
NetworkManager[2830]: <warn> Activation (p6p1) failed for connection '(null)'
NetworkManager[2830]: nm_settings_connection_get_timestamp: assertion `connection != NULL' failed
abrt[2882]: Saved core dump of pid 2830 (/usr/sbin/NetworkManager) to /var/tmp/abrt/ccpp-2013-09-15-11:38:39-2830 (18952192 bytes)
systemd[1]: NetworkManager.service: main process exited, code=dumped, status=11/SEGV
systemd[1]: Unit NetworkManager.service entered failed state.

https://bugzilla.redhat.com/show_bug.cgi?id=1008151
2013-09-17 19:14:39 +02:00