Commit graph

22529 commits

Author SHA1 Message Date
Thomas Haller
6c7bd42ddd release: bump version to 1.16.5 (development) 2019-08-07 16:20:28 +02:00
Thomas Haller
1e1c76a9db release: bump version to 1.16.4 2019-08-07 16:18:45 +02:00
Thomas Haller
d4ccd650b4 release: update NEWS 2019-08-07 16:18:40 +02:00
Beniamino Galvani
0ec37e55b2 modem: fix memory leak
Fixes: 9b935fad9b ('modem: don't use GAsyncResult pattern for disconnecting modem')
(cherry picked from commit 22cd9e754b)
(cherry picked from commit 47c772354e)
(cherry picked from commit 05319cb391)
2019-08-06 09:18:47 +02:00
Beniamino Galvani
98c019f708 libnm-core: fix ifcfg-rh variable name for DHCPv6 hostname
Fixes: 2852b50945 ('ifcfg-rh: add DHCPV6_HOSTNAME and DHCPV6_SEND_HOSTNAME vars')
(cherry picked from commit 657b8b31b0)
(cherry picked from commit df5d76b0dc)
(cherry picked from commit 7f532e9ab5)
2019-08-05 16:03:49 +02:00
Thomas Haller
f9bb1ddc2e wireguard: fix use-after free in _peers_remove()
(cherry picked from commit 85c26341a2)
(cherry picked from commit a3f9ab473b)
(cherry picked from commit 8bcfda364e)
2019-08-03 12:29:10 +02:00
Thomas Haller
65a46f1858 libnm: fix leak in NMSettingWireGuard's update_one_secret()
(cherry picked from commit eea8bbd9ae)
(cherry picked from commit 8f2e3d1439)
(cherry picked from commit 52dcdc98e8)
2019-08-03 11:30:55 +02:00
Beniamino Galvani
ba48493987 merge: branch 'bg/ovs-restart-part2-rh1733709'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/216

https://bugzilla.redhat.com/show_bug.cgi?id=1733709
(cherry picked from commit 5f668b81d3)
(cherry picked from commit 0581a53a46)
(cherry picked from commit e066ac5545)
2019-08-01 10:07:12 +02:00
Beniamino Galvani
af2a126dc0 device: fix releasing slaves
Not all masters type have a platform link and so it's wrong to check
for it to decide whether the slave should be really released. Move the
check to master devices that need it (bond, bridge and team).

OVS ports don't need the check because they don't call to platform to
remove a slave.

https://bugzilla.redhat.com/show_bug.cgi?id=1733709
(cherry picked from commit 57e3734b6c)
(cherry picked from commit ec1b5fb019)
(cherry picked from commit f6a90b899a)
2019-08-01 10:06:41 +02:00
Beniamino Galvani
33309f7c9f device: check platform link compatibility when setting nm-owned flag
We set nm-owned to indicate whether a software device was created by
NM or it was pre-existing. When checking the existence, we must verify
also whether the link type is compatible with the device, otherwise it
is possible to match unrelated interfaces. For example, when checking
for the existence of an ovs-bridge (which is not compatible with any
platform link) we could match a unrelated platform link with the same
name.

https://bugzilla.redhat.com/show_bug.cgi?id=1733709
(cherry picked from commit 3cb4b36261)
(cherry picked from commit cb20d0791a)
(cherry picked from commit 511ef27d5e)
2019-08-01 10:06:39 +02:00
Beniamino Galvani
f93018a41a ovs: don't release slaves on quit
An OVS bridge and its slaves can continue to work even after NM has
quit. Keep the interface enslaved when the @configure argument of
device->release_slave() is FALSE, which happens on quit and in other
circumstances when we don't really want to release the slave from its
master.

https://bugzilla.redhat.com/show_bug.cgi?id=1733709
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/215
(cherry picked from commit ccd4be4014)
(cherry picked from commit a1f39b69e0)
2019-08-01 10:05:40 +02:00
Thomas Haller
52b52d2f7d platform/netlink: mark nested netlink attribute with NLA_F_NESTED
Kernel 5.2 is adding stricter checking for netlink messages.
In particular, for certain API it checks now that NLA_F_NESTED flag is
set for nested attributes ([1]).

Note that libnl3 does not ever set this flag, and since our netlink
implementation is copied from there, certain netlink messages are now
rejected as invalid.

On the other hand, libmnl always adds this flag ([2]). So we should do that
as well.

In particular, this affects the WireGuard netlink API causing request
from NetworkManager to be rejected ([3]).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b424e432e770d6dd572765459d5b6a96a19c5286
[2] https://git.netfilter.org/libmnl/tree/src/attr.c?id=5937dfcb0185f5cb9cf275992ea701ec4e619d9c#n535
[3] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/212

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/210
(cherry picked from commit 7811d1c187)
(cherry picked from commit 57048338ee)
2019-07-23 14:45:36 +02:00
Marco Trevisan (Treviño)
6156720c0d device: free temporary typename with iface variable
To create a disambiguated name for some Bluetooth devices we use its type name
with iface, however this value is allocated but never free'd when passed to
g_strdup_printf.

So use instead a temporary variable and free it once done.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/208

Fixes: 8bbda5cdff
(cherry picked from commit b621aba5c2)
(cherry picked from commit 64ed96fb5f)
2019-07-22 08:31:50 +02:00
Thomas Haller
9c72ca5ee9 device: fix reapplying changes to connection ID and UUID
4 properties are not really relevant for an already activated connection
or it makes not sense to change them. These are connection.id, connection.uuid,
connection.autoconnect and connection.stable-id.

For convenience, we allow to reapply these. This way, one can take
a different setting (e.g. with a different connection.id or
connection.uuid) and reapply them, but such changes are silently
ignored.

However this was done wrongly. Instead of reverting the change to the new
applied connection, we would change the input connection.

This is bad, for example with

  nmcli connection up uuid cb922f18-e99a-49c6-b200-1678b5070a82
  nmcli connection modify cb922f18-e99a-49c6-b200-1678b5070a82 con-name "bogus"
  nmcli device reapply eth0

the last re-apply would reset the settings-connection's connection ID to
what was before, while accepting the new name on the applied-connection
(while it should have been rejected).

Fixes: bf3b3d444c ('device: avoid changing immutable properties during reapply')

(cherry picked from commit adb51c2a7f)
(cherry picked from commit 09f37d5bd4)
2019-07-18 12:21:06 +02:00
Thomas Haller
d3b7b0d286 core: fix mangling static IPv6 routes in nm_ip6_config_merge_setting()
https://bugzilla.redhat.com/show_bug.cgi?id=1727193

Fixes: 433d2f8659 ('core: merge IPv4 and IPv6 version of _nm_ip_config_merge_route_attributes()')
(cherry picked from commit a8fa015a4e)
(cherry picked from commit 44e4ed1e95)
2019-07-09 14:35:27 +02:00
Beniamino Galvani
4aa2773f54 ifcfg-rh: fix memory leak reading infiniband setting
(cherry picked from commit c045267837)
(cherry picked from commit 4150dd8c43)
2019-07-04 11:56:01 +02:00
Beniamino Galvani
ae4e82c30f device: ppp: check that connection has a PPPoE parent
NMDevicePPP only handles connections with the pppoe.parent property
set. match_connection() already checks this when we creating a new
device. We should also perform the same check in
check_connection_compatible().

Fixes: 6c3195931e ('core: implement activation of PPP devices')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/203
(cherry picked from commit 17f4a1e794)
(cherry picked from commit 5ca888d693)
2019-07-03 18:05:22 +02:00
Beniamino Galvani
d4141a1806 clients: fix printing hexadecimal enum values
Use the 'x' conversion specifier for hexadecimal numbers.

Fixes: f53218ed7c ('cli: add property type for enum and showcase for ipv6.addr-gen-mode'):
(cherry picked from commit 420554a72e)
(cherry picked from commit 9fe7ef6ca3)
2019-06-27 17:21:36 +02:00
Beniamino Galvani
5e1ee4ae9a device: set IPv6 token only when necessary
Setting the IPv6 token triggers a new router solicitation from kernel
and so we should avoid when not strictly necessary.

https://mail.gnome.org/archives/networkmanager-list/2019-May/msg00004.html
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/179
(cherry picked from commit e4ce9bd7af)
(cherry picked from commit 7f239eff44)
2019-06-26 09:20:58 +02:00
Beniamino Galvani
b30e266fdf connectivity: merge branch 'bg/concheck-issue181'
Don't start connectivity check on unconfigured devices.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/181
(cherry picked from commit 4dce38c37f)
(cherry picked from commit 45d47a680b)
2019-06-20 11:31:12 +02:00
Thomas Haller
36cdfe703f connectivity: make platform argument to nm_connectivity_check_start() optional
The platform is used to detect whether to skip the connectivity check right away.
It should be an optional argument, so one could avoid this pre-check.

(cherry picked from commit b626baa313)
(cherry picked from commit a842280dbe)
2019-06-20 11:26:42 +02:00
Thomas Haller
4f489ac450 connectivity: simplify passing result to idle handler
(cherry picked from commit 19c957f091)
(cherry picked from commit 3c2886f447)
2019-06-20 11:26:39 +02:00
Thomas Haller
597b8da697 connectivity: remove unused error varialbe in _idle_cb()
(cherry picked from commit 4001aee370)
(cherry picked from commit 28540a8eb8)
2019-06-20 11:26:35 +02:00
Beniamino Galvani
97d3d27591 device: don't start connectivity check on unconfigured devices
If the interface has no carrier, no addresses or no routes there is no
point in starting a connectivity check on it because it will fail.
Moreover, doing the check on a device without routes causes the
addition of a negative entry in the ARP table for each of the
addresses associated with the connectivity check host; this can lead
to poor network performances.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/181
(cherry picked from commit 91d447df19)
(cherry picked from commit 7f937ecece)
2019-06-20 11:26:34 +02:00
Beniamino Galvani
3f54307650 device: fix matching parent device by connection UUID
We must compare the UUID with the one on the *parent* device.

Also, simplify the checks to only return TRUE at the end of function.

Fixes: 27c281ac5a ('device: deduplicate match_parent()')

https://bugzilla.redhat.com/show_bug.cgi?id=1716438
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/176
(cherry picked from commit 3c54b5eb2b)
(cherry picked from commit 591837d6f5)
2019-06-20 11:20:50 +02:00
Beniamino Galvani
ec6b243738 cli: fix crash on autocompletion
@connections is NULL when doing autocompletion. Fixes the following:

 $ nmcli --complete-args con monitor ""
  help
  id
  uuid
  path
  filename
  ...
  Segmentation fault (core dumped)

Fixes: 4b3297271e ('cli: rework connection handling for multiple results')

https://bugzilla.redhat.com/show_bug.cgi?id=1716948
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/177
(cherry picked from commit 6a3bb90ad4)
(cherry picked from commit 52c886a6d7)
2019-06-20 11:20:46 +02:00
Beniamino Galvani
2666aa0bf1 cli: don't wait for connection change on update failure
When saving a connection, we wait the connection-changed signal before
proceeding to ensure that the remote connection is up to date.
However, no signal is emitted if the update fails and so we shouldn't
wait for it.

Fixes: a370faeb59 ('cli: wait for changed signal after updating a connection'):

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/124
https://bugzilla.redhat.com/show_bug.cgi?id=1702203
(cherry picked from commit 2d347e7e17)
(cherry picked from commit 3423629ff0)
2019-06-14 17:31:30 +02:00
Alfonso Sánchez-Beato
61b4f31d72 core/pppd-plugin: wait to recover port settings before notifying death
pppd restores the previous settings for the serial port it uses right
before exiting. It is especially important to do so because otherwise
ModemManager is not able to recover the port as it can receive a hangup
event from the port due to CLOCAL not being restored.  However, there is
currently a race condition that produces this issue. This is because
when PHASE_DEAD is notified, pppd still has not restored the port
settings - it does that a bit later, in the die() function.

This patch delays notifying PHASE_DEAD until when the exitnotify() hook
is called by pppd: when this happens the port settings have already been
restored.

There were previously efforts to fix this in commit fe090c34b7, so
PHASE_DEAD was used instead of PHASE_DISCONNECT to notify MM that the
port was disconnected, but that still early to ensure that the port
settings are restored.

The MM traces seen when the bug is triggered are:

ModemManager[2158]: <warn>  (ttyACM1): could not re-acquire serial port lock: (5) Input/output error
ModemManager[2158]: <warn>  Couldn't load Operator Code: 'Cannot run sequence: 'Could not open serial device ttyACM1: it has been forced close'

https://mail.gnome.org/archives/networkmanager-list/2019-June/msg00014.html

(cherry picked from commit a251712a72)
(cherry picked from commit 3caa065709)
2019-06-14 13:37:07 +02:00
Beniamino Galvani
3a8cab979d tui: add only some options to new bond connections
Instead of adding every known option to new bond connections, only add
the ones supported by UI.

https://bugzilla.redhat.com/show_bug.cgi?id=1715720
(cherry picked from commit b247950c6f)
(cherry picked from commit 5221af1123)
2019-06-11 18:38:01 +02:00
Beniamino Galvani
93bbe2a561 libnm-core: change unsupported modes for arp_ip_targets bond option
If the mode is one of '802.3ad', 'tlb' or 'alb' and the connection has
both 'arp_interval' and 'arp_ip_target' options, during normalization
we remove 'arp_interval' because unsupported in the current mode. The
connection then becomes invalid because 'arp_ip_target' requires
'arp_interval'.

Since 'arp_interval' and 'arp_ip_target' are mutually dependent, the
latter should also be unsupported for those bonding modes.

https://bugzilla.redhat.com/show_bug.cgi?id=1718173
(cherry picked from commit fa0f87fef7)
(cherry picked from commit e94127432c)
2019-06-11 18:38:00 +02:00
Beniamino Galvani
333956d47f device: reset cached route tables when starting new activation
The values cached in the device may be stale when we start a new
activation because in a disconnected state we might have called
ip_config_merge_and_apply() which cached the main table value.

(cherry picked from commit 5be69ba794)
(cherry picked from commit 14cfffa64c)
2019-06-11 15:43:26 +02:00
Thomas Haller
ad6eaa0856 libnm: belatedly expose nm_ethtool_optname_is_feature() in libnm
Also, plan right away to backport this symbol all the way back to
1.14.8. As such, we only need to add it once, with the right linker
version "libnm_1_14_8".

But still, the symbols first appears on a major release 1.20.0.

(cherry picked from commit a4c1489507)
(cherry picked from commit a7322eaa5d)
2019-06-11 15:38:11 +02:00
Thomas Haller
0c914eb846 version: add NM_AVAILABLE_IN_1_16_4 macro 2019-06-11 15:37:43 +02:00
Beniamino Galvani
373ddf2907 release: bump version to 1.16.3 (development) 2019-05-29 11:38:35 +02:00
Beniamino Galvani
44054f202c release: bump version to 1.16.2 2019-05-29 11:35:15 +02:00
Beniamino Galvani
6f16c9b70f release: update NEWS 2019-05-29 11:34:27 +02:00
Beniamino Galvani
835c5bf48a ifcfg-rh: merge branch 'bg/802-1x-client-cert-rh1705054'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/148
https://bugzilla.redhat.com/show_bug.cgi?id=1705054
(cherry picked from commit 7502fb0f5e)
(cherry picked from commit eb9dec78ee)
2019-05-28 13:50:33 +02:00
Beniamino Galvani
53f1490b50 ifcfg-rh: use PKCS #12 private key also as client cert in reader
Before commit e3ac45c026 the reader set the private key in the
setting using the libnm function, which also set the key as client
certificate if it was in PKCS #12 format.

After the commit, existing connections with a PKCS #12 private key but
without a client certificate became invalid. Restore the old behavior.

Fixes: e3ac45c026 ('ifcfg-rh: don't use 802-1x certifcate setter functions')
(cherry picked from commit 9a410fc312)
(cherry picked from commit 51896e1e6b)
2019-05-28 13:49:21 +02:00
Beniamino Galvani
a828815825 ifcfg-rh: don't check for 802.1x private key or client cert in reader
Let the setting check it in verify().

(cherry picked from commit d9b3b2b8ce)
(cherry picked from commit c28db67a78)
2019-05-28 13:49:19 +02:00
Beniamino Galvani
90517f1b4a ifcfg-rh: write client certificate even if it is pkcs12
The writer should only persist properties without too much additional
logic, which should be instead embedded in the setting itself.

(cherry picked from commit a995244e9b)
(cherry picked from commit 5a5cd8d05d)
2019-05-28 13:49:18 +02:00
Beniamino Galvani
c71b47268f team: don't kill teamd for external devices
The teamd instance must not be killed if the device was externally
activated.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/158
https://bugzilla.redhat.com/show_bug.cgi?id=1693142
(cherry picked from commit 008a4b4215)
(cherry picked from commit bd113fe72e)
2019-05-20 15:00:20 +02:00
Patrick J. Volkerding
6160888e61 hostname-manager: use fqdn for persistent hostname on Slackware
This will be the default for Slackware 15.0 and on.

This should be safe for both master and 1.12.x stable branch, as
no existing Slackware releases are expected to run NM-1.12.x or
later.

Signed-off-by: Robby Workman <rworkman@slackware.com>

https://mail.gnome.org/archives/networkmanager-list/2019-May/msg00011.html

(cherry picked from commit e1df17e0ac)
(cherry picked from commit 065e810424)
2019-05-19 10:48:32 +02:00
Thomas Haller
7a0f8520ff core: fix file permissions for "/var/lib/NetworkManager/secret_key"
Ooherwise, the file has wrong permissions:

  # ls -la /var/lib/NetworkManager/secret_key
  ----r-xr-x. 1 root root 50 May 14 13:52 /var/lib/NetworkManager/secret_key

Luckily, /var/lib/NetworkManager should be already

  # ls -lad /var/lib/NetworkManager
  drwx------. 2 root root 8192 May 14 13:57 /var/lib/NetworkManager

which mitigates this a bit.

Fixes: dbcb1d6d97 ('core: let nm_utils_secret_key_read() handle failures internally')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/175
(cherry picked from commit dc3a2f9bc4)
(cherry picked from commit 2d46247c6a)
2019-05-14 14:04:51 +02:00
Thomas Haller
1337ebd9d0 settings/d-bus: fix boolean return value of "LoadConnections"
The boolean value is intended to indicate success. It would indicated
failure due to a bug.

Fixes: 297d4985ab ('core/dbus: rework D-Bus implementation to use lower layer GDBusConnection API'):
(cherry picked from commit 22e830f046)
(cherry picked from commit e73a505866)
2019-05-10 15:40:06 +02:00
Thomas Haller
8fe900d323 settings: avoid assertion for LoadConnections D-Bus method with relative paths
$ busctl call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Settings org.freedesktop.NetworkManager.Settings LoadConnections as 1 relative/filename

triggers a g_critical() assertion in nm_utils_file_is_in_path():

  ...
  #3  0x00007ffff7a19e7d in g_return_if_fail_warning
      (log_domain=log_domain@entry=0x55555586c333 "NetworkManager", pretty_function=pretty_function@entry=0x55555586c0a0 <__FUNCTION__.38585> "nm_utils_file_is_in_path", expression=expression@entry=0x55555586c010 "abs_filename && abs_filename[0] == '/'") at ../glib/gmessages.c:2767
  #4  0x00005555555f1128 in nm_utils_file_is_in_path (abs_filename=abs_filename@entry=0x555555b56670 "dfd", abs_path=<optimized out>) at src/NetworkManagerUtils.c:1077
  #5  0x00005555555a4779 in load_connection (config=<optimized out>, filename=0x555555b56670 "dfd") at src/settings/plugins/keyfile/nms-keyfile-plugin.c:522
  #6  0x00005555557ce291 in nm_settings_plugin_load_connection (self=0x5555559fd400 [NMSKeyfilePlugin], filename=0x555555b56670 "dfd") at src/settings/nm-settings-plugin.c:70
  #7  0x000055555559ccdf in impl_settings_load_connections
      (obj=<optimized out>, interface_info=<optimized out>, method_info=<optimized out>, connection=<optimized out>, sender=<optimized out>, invocation=0x7fffe0015ed0 [GDBusMethodInvocation], parameters=<optimized out>) at src/settings/nm-settings.c:1439
  #8  0x00005555555a9bf9 in dbus_vtable_method_call
      (connection=0x5555559b91b0 [GDBusConnection], sender=sender@entry=0x555555b5c360 ":1.32283", object_path=object_path@entry=0x7fffe0019070 "/org/freedesktop/NetworkManager/Settings", interface_name=<optimized out>, interface_name@entry=0x7fffe002aa70 "org.freedesktop.NetworkManager.Settings", method_name=<optimized out>,
      method_name@entry=0x7fffe00276b0 "LoadConnections", parameters=parameters@entry=0x555555c4a690, invocation=0x7fffe0015ed0 [GDBusMethodInvocation], user_data=0x5555559a1a00)
      at src/nm-dbus-manager.c:947
  #9  0x00007ffff7c506c4 in call_in_idle_cb (user_data=user_data@entry=0x7fffe0015ed0) at ../gio/gdbusconnection.c:4874
  #10 0x00007ffff7a0e8eb in g_idle_dispatch (source=source@entry=0x7fffe00208a0, callback=0x7ffff7c50590 <call_in_idle_cb>, user_data=0x7fffe0015ed0) at ../glib/gmain.c:5627
  #11 0x00007ffff7a11fd0 in g_main_dispatch (context=0x555555994d00) at ../glib/gmain.c:3189
  #12 0x00007ffff7a11fd0 in g_main_context_dispatch (context=context@entry=0x555555994d00) at ../glib/gmain.c:3854
  #13 0x00007ffff7a12368 in g_main_context_iterate (context=0x555555994d00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:3927
  #14 0x00007ffff7a126b3 in g_main_loop_run (loop=0x555555995e60) at ../glib/gmain.c:4123
  #15 0x000055555558a741 in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:444

Filter out relative filenames early.

(cherry picked from commit a1b102eae4)
(cherry picked from commit c21171e069)
2019-05-10 14:46:25 +02:00
Beniamino Galvani
460124fe71 merge: branch 'bg/restore-ip6-addr-link-up-rh1548237'
https://bugzilla.redhat.com/show_bug.cgi?id=1548237
(cherry picked from commit db46d9b823)
(cherry picked from commit 008a5805bd)
2019-05-08 13:52:16 +02:00
Beniamino Galvani
33a01ab84b device: fix intersecting IPv6 configurations
If the link is down we shouldn't drop the link-local address from
configuration as it wasn't removed by user but by kernel.

(cherry picked from commit 18d2edfaa1)
(cherry picked from commit 6f69144500)
2019-05-08 13:51:52 +02:00
Beniamino Galvani
158dae6b5a device: unconditionally reapply IP configuration on link up
Consider the situation in which ipv4.method=auto and there is an
address configured. Also, the DHCP timeout is long and there is no
DHCP server. If the link is brought down temporarily, the prefix route
for the static address is lost and not restored by NM because we
reapply the IP configuration only when the IP state is DONE.

The same can happen also for IPv6, but in that case also static IPv6
addresses are lost.

We should always reapply the IP configuration when the link goes up.

(cherry picked from commit d0b16b9283)
(cherry picked from commit 4482ca64ba)
2019-05-08 13:51:50 +02:00
Beniamino Galvani
25af9b8f0f all: fix typos (milli seconds -> milliseconds)
(cherry picked from commit 4735d6764a)
(cherry picked from commit f6b9366eb4)
2019-05-08 13:51:49 +02:00
Beniamino Galvani
fc61af9a0a device: fix reapply of MTU
When we set the MTU on the link we remember its previous source
(ip-config, parent-device or connection profile) and don't change it
again afterwards to avoid interfering with user's manual changes. The
only exceptions when we change it again are (1) if the parent device
MTU changes and (2) if the new MTU has higher priority than the one
previously set.

To allow a live reapply of the MTU property we also need to clear the
saved source, or the checks described above will prevent setting the
new value.

Fixes: 2f8917237f ('device: rework mtu priority handling')

https://bugzilla.redhat.com/show_bug.cgi?id=1702657
(cherry picked from commit 4ed72fa658)
(cherry picked from commit e738479bdd)
2019-05-08 13:49:03 +02:00