|
|
7b922c |
From bb782ab4b2058e0ae14aae1a4c71bd0dc908fbdc Mon Sep 17 00:00:00 2001
|
|
|
7b922c |
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
|
7b922c |
Date: Tue, 7 May 2019 16:26:09 +0200
|
|
|
7b922c |
Subject: [PATCH 1/3] all: fix typos (milli seconds -> milliseconds)
|
|
|
7b922c |
|
|
|
7b922c |
(cherry picked from commit 4735d6764a5dc9c3bc6bc09d3220751e789b39c4)
|
|
|
7b922c |
(cherry picked from commit f6b9366eb4435d7ee45f862dabdefb5f87c4739d)
|
|
|
7b922c |
---
|
|
|
7b922c |
shared/nm-glib-aux/nm-time-utils.c | 2 +-
|
|
|
7b922c |
src/devices/nm-device.c | 2 +-
|
|
|
7b922c |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
7b922c |
|
|
|
7b922c |
diff --git a/shared/nm-glib-aux/nm-time-utils.c b/shared/nm-glib-aux/nm-time-utils.c
|
|
|
7b922c |
index ae526c342..98a414595 100644
|
|
|
7b922c |
--- a/shared/nm-glib-aux/nm-time-utils.c
|
|
|
7b922c |
+++ b/shared/nm-glib-aux/nm-time-utils.c
|
|
|
7b922c |
@@ -231,7 +231,7 @@ nm_utils_get_monotonic_timestamp_s (void)
|
|
|
7b922c |
* @timestamp: the monotonic-timestamp that should be converted into CLOCK_BOOTTIME.
|
|
|
7b922c |
* @timestamp_ns_per_tick: How many nano seconds make one unit of @timestamp? E.g. if
|
|
|
7b922c |
* @timestamp is in unit seconds, pass %NM_UTILS_NS_PER_SECOND; @timestamp in nano
|
|
|
7b922c |
- * seconds, pass 1; @timestamp in milli seconds, pass %NM_UTILS_NS_PER_SECOND/1000; etc.
|
|
|
7b922c |
+ * seconds, pass 1; @timestamp in milliseconds, pass %NM_UTILS_NS_PER_SECOND/1000; etc.
|
|
|
7b922c |
*
|
|
|
7b922c |
* Returns: the monotonic-timestamp as CLOCK_BOOTTIME, as returned by clock_gettime().
|
|
|
7b922c |
* The unit is the same as the passed in @timestamp basd on @timestamp_ns_per_tick.
|
|
|
7b922c |
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
|
|
|
7b922c |
index 8ae64b968..7bf1eb4ce 100644
|
|
|
7b922c |
--- a/src/devices/nm-device.c
|
|
|
7b922c |
+++ b/src/devices/nm-device.c
|
|
|
7b922c |
@@ -3588,7 +3588,7 @@ nm_device_set_carrier (NMDevice *self, gboolean carrier)
|
|
|
7b922c |
now_ms = nm_utils_get_monotonic_timestamp_ms ();
|
|
|
7b922c |
until_ms = NM_MAX (now_ms + _get_carrier_wait_ms (self), priv->carrier_wait_until_ms);
|
|
|
7b922c |
priv->carrier_defer_id = g_timeout_add (until_ms - now_ms, carrier_disconnected_action_cb, self);
|
|
|
7b922c |
- _LOGD (LOGD_DEVICE, "carrier: link disconnected (deferring action for %ld milli seconds) (id=%u)",
|
|
|
7b922c |
+ _LOGD (LOGD_DEVICE, "carrier: link disconnected (deferring action for %ld milliseconds) (id=%u)",
|
|
|
7b922c |
(long) (until_ms - now_ms), priv->carrier_defer_id);
|
|
|
7b922c |
}
|
|
|
7b922c |
}
|
|
|
7b922c |
--
|
|
|
7b922c |
2.20.1
|
|
|
7b922c |
|
|
|
7b922c |
From ef2113cf7c06d5157ddd2cdc26c1f781b60c477c Mon Sep 17 00:00:00 2001
|
|
|
7b922c |
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
|
7b922c |
Date: Tue, 7 May 2019 16:25:04 +0200
|
|
|
7b922c |
Subject: [PATCH 2/3] device: unconditionally reapply IP configuration on link
|
|
|
7b922c |
up
|
|
|
7b922c |
|
|
|
7b922c |
Consider the situation in which ipv4.method=auto and there is an
|
|
|
7b922c |
address configured. Also, the DHCP timeout is long and there is no
|
|
|
7b922c |
DHCP server. If the link is brought down temporarily, the prefix route
|
|
|
7b922c |
for the static address is lost and not restored by NM because we
|
|
|
7b922c |
reapply the IP configuration only when the IP state is DONE.
|
|
|
7b922c |
|
|
|
7b922c |
The same can happen also for IPv6, but in that case also static IPv6
|
|
|
7b922c |
addresses are lost.
|
|
|
7b922c |
|
|
|
7b922c |
We should always reapply the IP configuration when the link goes up.
|
|
|
7b922c |
|
|
|
7b922c |
(cherry picked from commit d0b16b9283dc16e9db642280be9d6b10a04092a8)
|
|
|
7b922c |
(cherry picked from commit 4482ca64ba5bbf1c173ea5b4a3854da0173542a8)
|
|
|
7b922c |
---
|
|
|
7b922c |
src/devices/nm-device.c | 12 ++++--------
|
|
|
7b922c |
1 file changed, 4 insertions(+), 8 deletions(-)
|
|
|
7b922c |
|
|
|
7b922c |
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
|
|
|
7b922c |
index 7bf1eb4ce..510d9792e 100644
|
|
|
7b922c |
--- a/src/devices/nm-device.c
|
|
|
7b922c |
+++ b/src/devices/nm-device.c
|
|
|
7b922c |
@@ -3890,16 +3890,12 @@ device_link_changed (NMDevice *self)
|
|
|
7b922c |
if (priv->up && (!was_up || seen_down)) {
|
|
|
7b922c |
/* the link was down and just came up. That happens for example, while changing MTU.
|
|
|
7b922c |
* We must restore IP configuration. */
|
|
|
7b922c |
- if (priv->ip_state_4 == NM_DEVICE_IP_STATE_DONE) {
|
|
|
7b922c |
- if (!ip_config_merge_and_apply (self, AF_INET, TRUE))
|
|
|
7b922c |
- _LOGW (LOGD_IP4, "failed applying IP4 config after link comes up again");
|
|
|
7b922c |
- }
|
|
|
7b922c |
+ if (!ip_config_merge_and_apply (self, AF_INET, TRUE))
|
|
|
7b922c |
+ _LOGW (LOGD_IP4, "failed applying IP4 config after link comes up again");
|
|
|
7b922c |
|
|
|
7b922c |
priv->linklocal6_dad_counter = 0;
|
|
|
7b922c |
- if (priv->ip_state_6 == NM_DEVICE_IP_STATE_DONE) {
|
|
|
7b922c |
- if (!ip_config_merge_and_apply (self, AF_INET6, TRUE))
|
|
|
7b922c |
- _LOGW (LOGD_IP6, "failed applying IP6 config after link comes up again");
|
|
|
7b922c |
- }
|
|
|
7b922c |
+ if (!ip_config_merge_and_apply (self, AF_INET6, TRUE))
|
|
|
7b922c |
+ _LOGW (LOGD_IP6, "failed applying IP6 config after link comes up again");
|
|
|
7b922c |
}
|
|
|
7b922c |
|
|
|
7b922c |
if (update_unmanaged_specs)
|
|
|
7b922c |
--
|
|
|
7b922c |
2.20.1
|
|
|
7b922c |
|
|
|
7b922c |
From b3f9c33557951ed90767ff50e9e72e533a211b45 Mon Sep 17 00:00:00 2001
|
|
|
7b922c |
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
|
7b922c |
Date: Tue, 7 May 2019 16:32:12 +0200
|
|
|
7b922c |
Subject: [PATCH 3/3] device: fix intersecting IPv6 configurations
|
|
|
7b922c |
|
|
|
7b922c |
If the link is down we shouldn't drop the link-local address from
|
|
|
7b922c |
configuration as it wasn't removed by user but by kernel.
|
|
|
7b922c |
|
|
|
7b922c |
(cherry picked from commit 18d2edfaa13d97597ddf5551e6dd5ea854f1fdbf)
|
|
|
7b922c |
(cherry picked from commit 6f6914450072b79a91731e042e498ca26892696c)
|
|
|
7b922c |
---
|
|
|
7b922c |
src/devices/nm-device.c | 3 ++-
|
|
|
7b922c |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
7b922c |
|
|
|
7b922c |
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
|
|
|
7b922c |
index 510d9792e..06a95110b 100644
|
|
|
7b922c |
--- a/src/devices/nm-device.c
|
|
|
7b922c |
+++ b/src/devices/nm-device.c
|
|
|
7b922c |
@@ -12882,7 +12882,8 @@ update_ext_ip_config (NMDevice *self, int addr_family, gboolean intersect_config
|
|
|
7b922c |
for (iter = priv->vpn_configs_6; iter; iter = iter->next)
|
|
|
7b922c |
nm_ip6_config_intersect (iter->data, priv->ext_ip_config_6, is_up, is_up, 0);
|
|
|
7b922c |
|
|
|
7b922c |
- if ( priv->ipv6ll_has
|
|
|
7b922c |
+ if ( is_up
|
|
|
7b922c |
+ && priv->ipv6ll_has
|
|
|
7b922c |
&& !nm_ip6_config_lookup_address (priv->ext_ip_config_6, &priv->ipv6ll_addr))
|
|
|
7b922c |
priv->ipv6ll_has = FALSE;
|
|
|
7b922c |
}
|
|
|
7b922c |
--
|
|
|
7b922c |
2.20.1
|
|
|
7b922c |
|