Commit Graph

21088 Commits

Author SHA1 Message Date
Beniamino Galvani
0dead63886 device: fix removal of pacrunner configurations
Don't try to remove the configuration if we haven't added it in the
first place, for example when the connection gets deactivated before
it completes or for slave connections without IP configuration.

Fixes: 3ad89223d0
(cherry picked from commit 3cada7722d)
2017-04-11 10:37:04 +02:00
Beniamino Galvani
1fe0b781fd pacrunner: specify domains only for VPNs
If a VPN provides a proxy, we want to restrict the usage of that proxy
to URLs in the VPN domain. For all other connections, the proxy should
be used for all domains.

(cherry picked from commit b139552255)
2017-04-11 10:37:00 +02:00
Beniamino Galvani
e4b323100e pacrunner: don't log pacrunner-manager address
It's a singleton, the address is not meaningful.

(cherry picked from commit 752e906aa4)
2017-04-11 10:36:57 +02:00
Beniamino Galvani
e895beb0da pacrunner: rework processing of configuration entries
Fix some issues in nm-pacrunner-manager.c:

 - when adding a configuration through nm_pacrunner_manager_send(), we
   kept an association between the interface name and the pacrunner
   configuration object path, so that the configuration for that
   interface could be removed later. Unfortunately not all
   configurations have an interface associated, so we need a more
   generic way to identify configurations. Introduce a new @tag
   argument that serves as key to match configurations

 - the interface name of the last pushed configuration was stored in
   the manager private config and reused later; this could cause
   issues when there are multiple outstanding D-Bus calls. The
   interface is not needed anymore after the previous point.

 - remove() didn't actually remove the configuration from the list

(cherry picked from commit 3ad89223d0)
2017-04-11 10:36:56 +02:00
Beniamino Galvani
0160834ea6 pacrunner: remove @domains from private struct
The domain list is not a property of the global pacrunner instance and
can be stored in a local variable.

(cherry picked from commit 10f6854369)
2017-04-11 10:36:55 +02:00
Lubomir Rintel
b35e10f0ed test: set 8021x private key password flags
Fixes: df0dc912cc
2017-04-10 14:07:03 +02:00
Beniamino Galvani
608ac31e87 wifi: merge branch 'th/wifi-ap-max-rate-bgo779771'
https://bugzilla.gnome.org/show_bug.cgi?id=779771
2017-04-10 13:38:12 +02:00
Beniamino Galvani
21c22f2f96 wifi: fix HT max rate calculation
The rates of MCSs are not monotonically increasing.
2017-04-10 13:37:24 +02:00
James Kalbfleisch
cd91b7e119 wifi: parse the first 77 bits of the supported mcs set 2017-04-10 13:37:24 +02:00
Thomas Haller
2b64961d05 wifi: avoid buffer overflow reading IEs 2017-04-10 13:37:24 +02:00
Thomas Haller
961d572472 wifi: rename ieee80211_eid capability defines
IEEE_80211_IE_VHT_CAP has zero hits searching the internet.
WLAN_EID_VHT_CAPABILITY is how the same define is called by
kernel's "include/linux/ieee80211.h".

Use the same name as kernel.

Also, collect the maximum of @max_rate.
2017-04-10 13:37:24 +02:00
Thomas Haller
0c6097ccbe wifi/trivial: rename get_max_rate*() functions 2017-04-10 13:37:24 +02:00
Thomas Haller
5bd7ff2ec0 wifi: collect maximum max-bitrate in nm_wifi_ap_update_from_properties() 2017-04-10 13:37:24 +02:00
Thomas Haller
b0016d47f1 wifi: fix unsigned error return value for get_max_rate()
Signal error via 0, not -1.

Also, if the length of the array is unexpected, error out.
2017-04-10 13:37:24 +02:00
Thomas Haller
3d8bc3bc01 wifi: replace "if" checks for rate with switch statement
Also, fix "if (mcs == (12 || 19 || 26))".
2017-04-10 13:37:24 +02:00
Thomas Haller
534a96d82a wifi: set changed flag for max-rate in nm_wifi_ap_update_from_properties() 2017-04-10 13:37:24 +02:00
Thomas Haller
6c534af4d7 wifi: fix compiler warnings 2017-04-10 13:37:24 +02:00
Thomas Haller
f27a0711e6 wifi/trivial: fix whitespace and style 2017-04-10 13:37:24 +02:00
James Kalbfleisch
f2b0092b5b wifi: parse BSS IEs for 80211n and 80211ac data rates
Currently, 'nmcli dev wifi list' does not show the user any rates above
54Mbps.  Now, we can check the IEs passed to NM from the wpa_supplicant,
pull the mcs rate and channel width information, and determine a maximum
possible data rate for 11n and 11ac APs.

https://bugzilla.gnome.org/show_bug.cgi?id=779771
2017-04-10 13:37:24 +02:00
Lubomir Rintel
583192d121 supplicant-config: correct the uri attribute/query separator 2017-04-10 10:33:24 +02:00
Lubomir Rintel
d4d6272fec ifcfg: don't complain if 8021x secrets are empty
The connection is still valid; and it's easily possible to create it. It would
be a shame if it couldn't be read back.
2017-04-10 10:33:24 +02:00
Lubomir Rintel
df0dc912cc 8021x: don't request secrets if they are empty and system owned
Empty secrets are fine. In particular, for PKCS#11 it means that protected
authentication path is used (the secrets are obtained on-demand from the
pinpad).
2017-04-10 10:33:23 +02:00
Lubomir Rintel
0812413c9d ifcfg-rh: fix loading the PKCS#11 client certificate
Contrary to the comment above, the reader would skip the client certificate
even if the key is on PKCS#11 token, not just in a PKCS#12 archive.
2017-04-10 10:33:22 +02:00
Beniamino Galvani
31327fee98 config: fix assertion in nm_config_device_state_write()
Fixes: 142ebb1037
(cherry picked from commit ad6930f052)
2017-04-08 10:24:10 +02:00
Dan Williams
8608158ed8 device-bond: fix possible uninitialized variable
src/devices/nm-device-bond.c: In function 'check_changed_options':
src/devices/nm-device-bond.c:529:4: error: 'name' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    g_set_error (error,
    ^
src/devices/nm-device-bond.c:505:14: note: 'name' was declared here
  const char *name, *value_a, *value_b;
              ^
src/devices/nm-device-bond.c:528:8: error: 'value_a' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (!nm_streq0 (value_a, value_b)) {
        ^
src/devices/nm-device-bond.c:505:21: note: 'value_a' was declared here
  const char *name, *value_a, *value_b;
                     ^

(cherry picked from commit f66de1dd0f)
2017-04-07 12:03:22 -05:00
Dan Williams
e6f8494dc6 auth-utils: fix possibly uninitialized variables
src/nm-auth-utils.c:343:6: error: 'is_authorized' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (is_authorized) {
      ^
src/nm-auth-utils.c:320:11: note: 'is_authorized' was declared here
  gboolean is_authorized, is_challenge;
           ^
src/nm-auth-utils.c:346:13: error: 'is_challenge' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   } else if (is_challenge) {
             ^
src/nm-auth-utils.c:320:26: note: 'is_challenge' was declared here
  gboolean is_authorized, is_challenge;
                          ^

(cherry picked from commit 24ab2a4945)
2017-04-07 12:03:14 -05:00
Dan Williams
63bc33122e default-route-manager: fix possibly uninitialized variable
src/nm-default-route-manager.c: In function '_ipx_update_default_route':
src/nm-default-route-manager.c:769:23: error: 'is_assumed' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if (!default_route && !is_assumed) {
                       ^
src/nm-default-route-manager.c:763:13: note: 'is_assumed' was declared here
    gboolean is_assumed;
             ^

(cherry picked from commit 857f26dd19)
2017-04-07 12:03:04 -05:00
Dan Williams
f66de1dd0f device-bond: fix possible uninitialized variable
src/devices/nm-device-bond.c: In function 'check_changed_options':
src/devices/nm-device-bond.c:529:4: error: 'name' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    g_set_error (error,
    ^
src/devices/nm-device-bond.c:505:14: note: 'name' was declared here
  const char *name, *value_a, *value_b;
              ^
src/devices/nm-device-bond.c:528:8: error: 'value_a' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (!nm_streq0 (value_a, value_b)) {
        ^
src/devices/nm-device-bond.c:505:21: note: 'value_a' was declared here
  const char *name, *value_a, *value_b;
                     ^
2017-04-07 11:56:53 -05:00
Dan Williams
24ab2a4945 auth-utils: fix possibly uninitialized variables
src/nm-auth-utils.c:343:6: error: 'is_authorized' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (is_authorized) {
      ^
src/nm-auth-utils.c:320:11: note: 'is_authorized' was declared here
  gboolean is_authorized, is_challenge;
           ^
src/nm-auth-utils.c:346:13: error: 'is_challenge' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   } else if (is_challenge) {
             ^
src/nm-auth-utils.c:320:26: note: 'is_challenge' was declared here
  gboolean is_authorized, is_challenge;
                          ^
2017-04-07 11:52:16 -05:00
Dan Williams
857f26dd19 default-route-manager: fix possibly uninitialized variable
src/nm-default-route-manager.c: In function '_ipx_update_default_route':
src/nm-default-route-manager.c:769:23: error: 'is_assumed' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if (!default_route && !is_assumed) {
                       ^
src/nm-default-route-manager.c:763:13: note: 'is_assumed' was declared here
    gboolean is_assumed;
             ^
2017-04-07 11:33:06 -05:00
Beniamino Galvani
ad6930f052 config: fix assertion in nm_config_device_state_write()
Fixes: 142ebb1037
2017-04-07 16:56:33 +02:00
Thomas Haller
0726ab54d6 core: only persist explicit managed state in device's state file
For example, when starting without Wi-Fi plugin, a generic device
is created. On stop, we should not store the unmanaged state
on the state file, otherwise after restart the device is unmanaged.

Only store explicit user decisions.

https://bugzilla.redhat.com/show_bug.cgi?id=1440171
(cherry picked from commit 142ebb1037)
2017-04-07 15:27:26 +02:00
Thomas Haller
142ebb1037 core: only persist explicit managed state in device's state file
For example, when starting without Wi-Fi plugin, a generic device
is created. On stop, we should not store the unmanaged state
on the state file, otherwise after restart the device is unmanaged.

Only store explicit user decisions.

https://bugzilla.redhat.com/show_bug.cgi?id=1440171
2017-04-07 15:27:04 +02:00
Beniamino Galvani
fad2cf0721 pacrunner: remove failed and pending items from configuration list
If a configuration does not have a path it is because we are still
sending it to pacrunner or because we failed to do so. In both cases,
we have to remove the configuration from the list.

Fixes: 3ad89223d0
2017-04-07 15:15:27 +02:00
Beniamino Galvani
3cada7722d device: fix removal of pacrunner configurations
Don't try to remove the configuration if we haven't added it in the
first place, for example when the connection gets deactivated before
it completes or for slave connections without IP configuration.

Fixes: 3ad89223d0
2017-04-07 15:15:27 +02:00
Thomas Haller
b72445d6f6 build: fix broken line wraps in Makefile.am
(cherry picked from commit ab47a2d5fe)
2017-04-07 13:53:01 +02:00
Thomas Haller
ab47a2d5fe build: fix broken line wraps in Makefile.am 2017-04-07 13:52:12 +02:00
Thomas Haller
f975cb635a build: add missing build dependency for ifupdown
And reorder _OBJECTS dependencies of settings plugins after their
corresponding _LDADD declartion.

https://mail.gnome.org/archives/networkmanager-list/2017-April/msg00016.html
(cherry picked from commit 9f7380e973)
2017-04-07 12:42:53 +02:00
Thomas Haller
9f7380e973 build: add missing build dependency for ifupdown
And reorder _OBJECTS dependencies of settings plugins after their
corresponding _LDADD declartion.

https://mail.gnome.org/archives/networkmanager-list/2017-April/msg00016.html
2017-04-07 12:37:56 +02:00
Thomas Haller
0b92c26bda cli: fix invalid assertion
Fixes: 19c70ace95
2017-04-06 15:41:27 +02:00
Lubomir Rintel
1d08fba49b release: bump version to 1.7.91 (1.8-rc2) 2017-04-06 13:50:32 +02:00
Lubomir Rintel
d77449314a linux-platform: fix link_get_unmanaged() return value
The function is supposed to set *unamanged to NM_UNMANAGED's and indicate
whether NM_UNMANAGED was present in the return value.

Fixes: e32839838e
(cherry picked from commit b7b0227935)
2017-04-06 13:25:48 +02:00
Lubomir Rintel
b7b0227935 linux-platform: fix link_get_unmanaged() return value
The function is supposed to set *unamanged to NM_UNMANAGED's and indicate
whether NM_UNMANAGED was present in the return value.

Fixes: e32839838e
2017-04-06 13:23:19 +02:00
Beniamino Galvani
bac864725b pacrunner: merge branch 'bg/pacrunner-domains-bgo780558'
https://bugzilla.gnome.org/show_bug.cgi?id=780558
2017-04-06 08:58:14 +02:00
Beniamino Galvani
b139552255 pacrunner: specify domains only for VPNs
If a VPN provides a proxy, we want to restrict the usage of that proxy
to URLs in the VPN domain. For all other connections, the proxy should
be used for all domains.
2017-04-06 08:57:35 +02:00
Beniamino Galvani
752e906aa4 pacrunner: don't log pacrunner-manager address
It's a singleton, the address is not meaningful.
2017-04-06 08:57:35 +02:00
Beniamino Galvani
3ad89223d0 pacrunner: rework processing of configuration entries
Fix some issues in nm-pacrunner-manager.c:

 - when adding a configuration through nm_pacrunner_manager_send(), we
   kept an association between the interface name and the pacrunner
   configuration object path, so that the configuration for that
   interface could be removed later. Unfortunately not all
   configurations have an interface associated, so we need a more
   generic way to identify configurations. Introduce a new @tag
   argument that serves as key to match configurations

 - the interface name of the last pushed configuration was stored in
   the manager private config and reused later; this could cause
   issues when there are multiple outstanding D-Bus calls. The
   interface is not needed anymore after the previous point.

 - remove() didn't actually remove the configuration from the list
2017-04-06 08:57:35 +02:00
Beniamino Galvani
10f6854369 pacrunner: remove @domains from private struct
The domain list is not a property of the global pacrunner instance and
can be stored in a local variable.
2017-04-06 08:57:23 +02:00
Thomas Haller
7eafd1d833 travis: don't check for setting-docs.c file
Fixes: b3e2808c32
2017-04-05 19:09:25 +02:00
Thomas Haller
9800b1dccc libnm: move public nm_utils_enum_*() functions back to libnm-core
Commit a8730c51c8 moved the enum
utils from libnm-core to shared/nm-utils.

However, three of those functions are part of public API in libnm.
So, when statically linking against "shared/nm-utils/nm-enum-utils.c"
and dynamically linking against libnm.so, those symbols are present
twice and cause a linker failure.

Fix that by moving the public API back to libnm-core.

Fixes: a8730c51c8
2017-04-05 18:38:31 +02:00