Commit graph

16847 commits

Author SHA1 Message Date
Thomas Haller 7b84c73331 shared/tests: add nmtst_rand_perm_gslist() helper 2017-01-20 21:05:58 +01:00
Thomas Haller b957403efd core: refactor evaluation of device's match-spec
Previously, we would have different functions like
  - nm_match_spec_device_type()
  - nm_match_spec_hwaddr()
  - nm_match_spec_s390_subchannels()
  - nm_match_spec_interface_name()
which all would handle one type of match-spec.

So, to get the overall result whether the arguments
match or not, nm_device_spec_match_list() had to stich
them together and iterate the list multiple times.

Refactor the code to have one nm_match_spec_device()
function that gets all relevant paramters.

The upside is:

  - the logic how to evaluate the match-spec is all at one place
    (match_device_eval()) instead of spread over multiple
    functions.

  - It requires iterating the list at most twice. Twice, because
    we do a fast pre-search for "*".

One downside could be, that we have to pass all 4 arguments
for the evaluation, even if the might no be needed. That is,
because "nm-core-utils.c" shall be independend from NMDevice, it
cannot receive a device instance to get the parameters as needed.
As we would add new match-types, the argument list would grow.
However, all arguments are cached and fetching them from the
device's private data is very cheap.
2017-01-20 20:59:14 +01:00
Beniamino Galvani 2e8af781c5 device: don't call _commit_mtu() when ipv4.method=disabled
After commit 553717bb1c ("device: don't set ip4_state=IP_FAIL for
ipv4.method=disabled"), we commit an empty IPv4 configuration when
IPv4 is disabled. This means that it's not necessary anymore to call
_commit_mtu() because the MTU will be set in
ip4_config_merge_and_apply().

(cherry picked from commit 714b18dcf7)
2017-01-20 18:43:48 +01:00
Beniamino Galvani 303a65b4dd vlan: use parent interface mtu as default
After commit 22e8af6242 ("device: set a per-device default MTU on
activation") we explicitly set the VLAN MTU to 1500 if not overridden
by user settings. This has the advantage that the MTU is set to a
predictable value, while before it could have different values
depending on when the interface was created (for example, the
interface would get a 1500 MTU if created during boot, or would
inherit the parent's MTU if activated manually).

However, a better default value is the MTU of the parent interface
which is in most cases what the user wants. This value was the default
before commit 22e8af6242 for manually activated connections.

https://bugzilla.redhat.com/show_bug.cgi?id=1414186
(cherry picked from commit 7dde8d8106)
2017-01-20 18:43:48 +01:00
Beniamino Galvani 7dde8d8106 vlan: use parent interface mtu as default
After commit 22e8af6242 ("device: set a per-device default MTU on
activation") we explicitly set the VLAN MTU to 1500 if not overridden
by user settings. This has the advantage that the MTU is set to a
predictable value, while before it could have different values
depending on when the interface was created (for example, the
interface would get a 1500 MTU if created during boot, or would
inherit the parent's MTU if activated manually).

However, a better default value is the MTU of the parent interface
which is in most cases what the user wants. This value was the default
before commit 22e8af6242 for manually activated connections.

https://bugzilla.redhat.com/show_bug.cgi?id=1414186
2017-01-20 18:35:01 +01:00
Beniamino Galvani 8134d72f49 build: libnm-wwan.so depends on linker script 2017-01-20 17:41:57 +01:00
Beniamino Galvani 714b18dcf7 device: don't call _commit_mtu() when ipv4.method=disabled
After commit 553717bb1c ("device: don't set ip4_state=IP_FAIL for
ipv4.method=disabled"), we commit an empty IPv4 configuration when
IPv4 is disabled. This means that it's not necessary anymore to call
_commit_mtu() because the MTU will be set in
ip4_config_merge_and_apply().
2017-01-20 17:41:48 +01:00
Thomas Haller 29a8116fd0 device: mark properties in set_property() as construct-only
(cherry picked from commit ba47744997)
2017-01-20 17:41:09 +01:00
Thomas Haller ba47744997 device: mark properties in set_property() as construct-only 2017-01-20 17:33:44 +01:00
Thomas Haller 3b69a05fa0 device: remove duplicate setting of device's driver property
Fixes: 4dbaac4ba2
(cherry picked from commit 59f37f31d9)
2017-01-20 17:11:56 +01:00
Thomas Haller 0fd3ec81fd contrib/rpm: let NetworkManager-libnm and NetworkManager-glib of differing version conflict
Since commit "c920909 contrib/rpm: put translations in
NetworkManager-libnm and NetworkManager-glib packages", both
subpackages install the same translation files without a direct
dependency between the two packages. Thus, if a user tries
to update only one of the two subpackages, it will fail
during the installation due to conflicting files.

Fix that by having the subpackages conflict (per version).
This way, the conflict is detected before starting the
installation.

https://bugzilla.redhat.com/show_bug.cgi?id=1406454
(cherry picked from commit b85b8ed6fa)
2017-01-20 17:11:55 +01:00
Thomas Haller 59f37f31d9 device: remove duplicate setting of device's driver property
Fixes: 4dbaac4ba2
2017-01-20 17:10:54 +01:00
Thomas Haller b85b8ed6fa contrib/rpm: let NetworkManager-libnm and NetworkManager-glib of differing version conflict
Since commit "c920909 contrib/rpm: put translations in
NetworkManager-libnm and NetworkManager-glib packages", both
subpackages install the same translation files without a direct
dependency between the two packages. Thus, if a user tries
to update only one of the two subpackages, it will fail
during the installation due to conflicting files.

Fix that by having the subpackages conflict (per version).
This way, the conflict is detected before starting the
installation.

https://bugzilla.redhat.com/show_bug.cgi?id=1406454
2017-01-20 17:10:38 +01:00
Lubomir Rintel c2b9bb1844 veth: properly chain up the overridden notify method
Fixes: 992beb4f34
(cherry picked from commit af16cd5a92)
2017-01-20 16:29:53 +01:00
Lubomir Rintel af16cd5a92 veth: properly chain up the overridden notify method
Fixes: 992beb4f34
2017-01-20 16:09:05 +01:00
Lubomir Rintel 0822cbb032 libnm/object: lower the severity of the dangling object warning
The user can't do much about it and we can recover. This is a temporary
measure to avoid unnecessarily bothering the user.

(cherry picked from commit 7fec0755c9)
2017-01-19 16:15:42 +01:00
Lubomir Rintel 1afbf948a0 build: use different defaults for snapshot builds
Enable stricter compiler checks only for snapshot builds and default to more
tracing and asserting there.

(cherry picked from commit c1bb45c361)
2017-01-19 16:15:35 +01:00
Lubomir Rintel fd47a9a762 build: move the --enable-more-warning option from m4/ to configure.ac
It will make it easier to policy the default.

(cherry picked from commit 8647be3717)
2017-01-19 16:15:30 +01:00
Lubomir Rintel 9d431169c3 device: fix build with old glib & more asserts
src/devices/nm-device.c:8319:4: error: invalid use of void expression

(cherry picked from commit a4d61bf299)
2017-01-19 14:24:29 +01:00
Beniamino Galvani 99110ce529 act-request: return empty properties when not activated
We start to track changes to the device's properties only after the
active connection gets activated. It's wrong to return properties
while we don't track their changes as this causes stale objects
references on D-Bus. Let's return DHCP and IP configurations from the
device only when the connection is activated.

(cherry picked from commit 4215c2640a)
2017-01-19 14:23:38 +01:00
Lubomir Rintel b916d9dfe0 build: fix build with older gi
Fixes: 6c96aafaa9
(cherry picked from commit 22722b7732)
2017-01-19 14:18:26 +01:00
Lubomir Rintel 22722b7732 build: fix build with older gi
Fixes: 6c96aafaa9
2017-01-19 13:36:03 +01:00
Beniamino Galvani 4215c2640a act-request: return empty properties when not activated
We start to track changes to the device's properties only after the
active connection gets activated. It's wrong to return properties
while we don't track their changes as this causes stale objects
references on D-Bus. Let's return DHCP and IP configurations from the
device only when the connection is activated.
2017-01-19 11:41:16 +01:00
Lubomir Rintel 2ee8462774 build: make the doc generator find the right libnm.so
At some point gobject-introspection added an API to add a library path
and stopped honoring the LD_LIBRARY_PATH (a bug, according to GI
documentation?).

(cherry picked from commit 6c96aafaa9)
2017-01-19 11:21:38 +01:00
Lubomir Rintel 6c96aafaa9 build: make the doc generator find the right libnm.so
At some point gobject-introspection added an API to add a library path
and stopped honoring the LD_LIBRARY_PATH (a bug, according to GI
documentation?).
2017-01-19 11:08:45 +01:00
Thomas Haller ec805a6ce6 supplicant: update capabilities before marking manager as running
(cherry picked from commit 19ceaa1dc9)
2017-01-18 18:58:38 +01:00
Thomas Haller 6b6db3124a supplicant: update whether EAP-FAST is supported for existing supplicant-interface
As the fast-supported flag changes, update the existing supplicant
interfaces with the new information.

Also, by default assume it is supported.

(cherry picked from commit 872b9ec5ea)
2017-01-18 18:58:38 +01:00
Thomas Haller 1caae3743d supplicant: fix detection of EAP-FAST
At least with my supplicant, the capability is called
all-upper-case "FAST".

The check used case-insensitive, but that was broken
by a previous change.

Fixes: 9f5f141100
(cherry picked from commit 66ff601ecf)
2017-01-18 18:58:36 +01:00
Thomas Haller a18eed123b supplicant: merge branch 'th/supplicant-eap-fast-supported' 2017-01-18 18:56:46 +01:00
Thomas Haller 19ceaa1dc9 supplicant: update capabilities before marking manager as running 2017-01-18 18:56:01 +01:00
Thomas Haller 872b9ec5ea supplicant: update whether EAP-FAST is supported for existing supplicant-interface
As the fast-supported flag changes, update the existing supplicant
interfaces with the new information.

Also, by default assume it is supported.
2017-01-18 18:56:01 +01:00
Thomas Haller 66ff601ecf supplicant: fix detection of EAP-FAST
At least with my supplicant, the capability is called
all-upper-case "FAST".

The check used case-insensitive, but that was broken
by a previous change.

Fixes: 9f5f141100
2017-01-18 18:56:01 +01:00
Thomas Haller d5685c183c release: bump version to 1.7.0 (development)
belatedly...
2017-01-18 18:37:06 +01:00
Lubomir Rintel a4d61bf299 device: fix build with old glib & more asserts
src/devices/nm-device.c:8319:4: error: invalid use of void expression
2017-01-18 13:32:25 +01:00
Lubomir Rintel 7fec0755c9 libnm/object: lower the severity of the dangling object warning
The user can't do much about it and we can recover. This is a temporary
measure to avoid unnecessarily bothering the user.
2017-01-18 12:40:18 +01:00
Lubomir Rintel c1bb45c361 build: use different defaults for snapshot builds
Enable stricter compiler checks only for snapshot builds and default to more
tracing and asserting there.
2017-01-18 12:40:18 +01:00
Lubomir Rintel 8647be3717 build: move the --enable-more-warning option from m4/ to configure.ac
It will make it easier to policy the default.
2017-01-18 12:40:18 +01:00
Thomas Haller 90f097b9f5 build: don't install /etc/dbus-1/system.d/nm-ifcfg-rh.conf when building without ifcfg-rh plugin
(cherry picked from commit cca0ba01e4)
2017-01-18 00:11:21 +01:00
Thomas Haller cca0ba01e4 build: don't install /etc/dbus-1/system.d/nm-ifcfg-rh.conf when building without ifcfg-rh plugin 2017-01-18 00:10:29 +01:00
Thomas Haller c218fd44bc tests: fix tests without libjansson support (--enable-json-validation=no)
(cherry picked from commit a5acd0bdc6)
2017-01-17 23:52:18 +01:00
Thomas Haller a5acd0bdc6 tests: fix tests without libjansson support (--enable-json-validation=no) 2017-01-17 23:51:57 +01:00
Piotr Drąg e1d3759712 po: update Polish (pl) translation (bgo #777402)
https://bugzilla.gnome.org/show_bug.cgi?id=777402
(cherry picked from commit 39455bb99f)
2017-01-17 23:04:14 +01:00
Piotr Drąg 39455bb99f po: update Polish (pl) translation (bgo #777402)
https://bugzilla.gnome.org/show_bug.cgi?id=777402
2017-01-17 23:03:35 +01:00
Lubomir Rintel de0df39646 device: add an initializer
Basically to silence gcc that is not smart enough to understand how does
.initialized and .value relate.

  src/devices/nm-device.c: In function '_commit_mtu':
  src/devices/nm-device.c:6754:15: error: 'ip6_mtu_sysctl.value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     if (ip6_mtu && ip6_mtu != _IP6_MTU_SYS ()) {
                 ^

(cherry picked from commit 7ce805d49d)
2017-01-17 22:54:17 +01:00
Lubomir Rintel 7ce805d49d device: add an initializer
Basically to silence gcc that is not smart enough to understand how does
.initialized and .value relate.

  src/devices/nm-device.c: In function '_commit_mtu':
  src/devices/nm-device.c:6754:15: error: 'ip6_mtu_sysctl.value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     if (ip6_mtu && ip6_mtu != _IP6_MTU_SYS ()) {
                 ^
2017-01-17 16:20:39 +01:00
Lubomir Rintel ba414491b7 release: bump version to 1.5.3 (1.6-rc1) 2017-01-17 14:50:22 +01:00
Thomas Haller 4100fc1d4d proxy: merge branch 'jk/proxy-fixes'
https://bugzilla.gnome.org/show_bug.cgi?id=777385
2017-01-17 14:27:42 +01:00
Jiří Klimeš 49e1fefc35 ifcfg-rh: add a basic test for Proxy setting 2017-01-17 14:27:31 +01:00
Jiří Klimeš 6397ce1fac cli: enable TAB-completion for proxy properties in interactive editor 2017-01-17 14:27:31 +01:00
Jiří Klimeš 1abee2e0d5 pacrunner: fix a few typos, uniforms spelling of various forms to "pacrunner" 2017-01-17 14:27:31 +01:00