diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-01-29 10:37:20 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-01-29 10:37:20 +0100 |
| commit | ff7ca6f26bc6763f53920c85e2c3b66259003527 (patch) | |
| tree | 19de30bc725005d8972eb08d500c1b01d7c35101 /debian | |
| parent | 5a09f7759860f4f2a9bb01471ca8099cd705bc10 (diff) | |
| parent | 55780b62324ba5492ce2670817fc0a8c209cc138 (diff) | |
Merge remote-tracking branch 'salsa/debian/master' into ubuntu/master
Diffstat (limited to 'debian')
6 files changed, 43 insertions, 142 deletions
diff --git a/debian/changelog b/debian/changelog index 97081a58..d8bf0064 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,17 @@ -network-manager (1.22.2-2ubuntu1) UNRELEASED; urgency=medium +network-manager (1.22.4-1ubuntu1) UNRELEASED; urgency=medium * New upstream version, merged from Debian - * debian/patches/libnm-Check-self-still-NMManager-or-not.patch: - - removed undocumented change that doesn't apply after refactoring - -- Sebastien Bacher <seb128@ubuntu.com> Mon, 13 Jan 2020 16:10:02 +0100 + -- Sebastien Bacher <seb128@ubuntu.com> Wed, 29 Jan 2020 10:37:03 +0100 + +network-manager (1.22.4-1) unstable; urgency=medium + + * New upstream version 1.22.4 + * Rebase patches + * n-dhcp4: fix integer context in n_dhcp4_client_probe_transition_nak() on + 32 bit + + -- Michael Biebl <biebl@debian.org> Wed, 15 Jan 2020 03:00:29 +0100 network-manager (1.22.2-2) unstable; urgency=medium diff --git a/debian/patches/dhcp-nettools-handle-retracted-event-as-expired.patch b/debian/patches/dhcp-nettools-handle-retracted-event-as-expired.patch deleted file mode 100644 index 23378ce5..00000000 --- a/debian/patches/dhcp-nettools-handle-retracted-event-as-expired.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Beniamino Galvani <bgalvani@redhat.com> -Date: Tue, 7 Jan 2020 12:03:21 +0100 -Subject: dhcp: nettools: handle 'retracted' event as 'expired' - -The 'retracted' event is emitted when the client receives a NAK in the -rebooting, requesting, renewing or rebinding state, while 'expired' -means that the client wasn't able to renew the lease before expiry. - -In both cases the old lease is no longer valid and n-dhcp4 keep trying -to get a lease, so the two events should be handlded in the same way. - -Note that the systemd client doesn't have a 'retracted' event and -considers all NAKs as 'expired' events. - -(cherry picked from commit 2523000b36b113fd7b94ae6b7178f6fd33908ef9) -(cherry picked from commit 92b382e2f85b0870b553358cec0209a0a0e3ce31) ---- - src/dhcp/nm-dhcp-nettools.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c -index 1f76c64..b4c0a45 100644 ---- a/src/dhcp/nm-dhcp-nettools.c -+++ b/src/dhcp/nm-dhcp-nettools.c -@@ -1028,10 +1028,10 @@ dhcp4_event_handle (NMDhcpNettools *self, - _LOGW ("selecting lease failed: %d", r); - } - break; -+ case N_DHCP4_CLIENT_EVENT_RETRACTED: - case N_DHCP4_CLIENT_EVENT_EXPIRED: - nm_dhcp_client_set_state (NM_DHCP_CLIENT (self), NM_DHCP_STATE_EXPIRE, NULL, NULL); - break; -- case N_DHCP4_CLIENT_EVENT_RETRACTED: - case N_DHCP4_CLIENT_EVENT_CANCELLED: - nm_dhcp_client_set_state (NM_DHCP_CLIENT (self), NM_DHCP_STATE_FAIL, NULL, NULL); - break; diff --git a/debian/patches/n-dhcp4-allow-calling-listen-on-already-listening-connect.patch b/debian/patches/n-dhcp4-allow-calling-listen-on-already-listening-connect.patch deleted file mode 100644 index d682210b..00000000 --- a/debian/patches/n-dhcp4-allow-calling-listen-on-already-listening-connect.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Beniamino Galvani <bgalvani@redhat.com> -Date: Tue, 7 Jan 2020 12:01:39 +0100 -Subject: n-dhcp4: allow calling listen() on already listening connection - -When the client enters the INIT state, it calls listen() on the -connection connection to create the packet socket. However, if the -client is coming from the REBOOTING state after a NAK, the connection -is already in the listening state; do nothing in such case. - -(cherry picked from commit 4bcdc3c1ebe3e2e8a967ff067ecb2a8cbfc2f6ab) -(cherry picked from commit 2e1d3ae572a753f0181760d9fa41558d33849b09) ---- - shared/n-dhcp4/src/n-dhcp4-c-connection.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/shared/n-dhcp4/src/n-dhcp4-c-connection.c b/shared/n-dhcp4/src/n-dhcp4-c-connection.c -index e51a3e3..f3ae44e 100644 ---- a/shared/n-dhcp4/src/n-dhcp4-c-connection.c -+++ b/shared/n-dhcp4/src/n-dhcp4-c-connection.c -@@ -139,6 +139,9 @@ int n_dhcp4_c_connection_listen(NDhcp4CConnection *connection) { - _c_cleanup_(c_closep) int fd_packet = -1; - int r; - -+ if (connection->state == N_DHCP4_C_CONNECTION_STATE_PACKET) -+ return 0; -+ - c_assert(connection->state == N_DHCP4_C_CONNECTION_STATE_INIT || - connection->state == N_DHCP4_C_CONNECTION_STATE_DRAINING || - connection->state == N_DHCP4_C_CONNECTION_STATE_UDP); diff --git a/debian/patches/n-dhcp4-fix-integer-context-in-n_dhcp4_client_probe_trans.patch b/debian/patches/n-dhcp4-fix-integer-context-in-n_dhcp4_client_probe_trans.patch new file mode 100644 index 00000000..6f5360c2 --- /dev/null +++ b/debian/patches/n-dhcp4-fix-integer-context-in-n_dhcp4_client_probe_trans.patch @@ -0,0 +1,31 @@ +From: Thomas Haller <thaller@redhat.com> +Date: Tue, 14 Jan 2020 16:20:56 +0100 +Subject: n-dhcp4: fix integer context in + n_dhcp4_client_probe_transition_nak() on 32 bit + +Fixes: 218782a9a3c3 ('n-dhcp4: restart the transaction after a NAK') + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/339 +(cherry picked from commit de818bf610ba0fed2b275a19fe3e6f9cbfa1862b) +(cherry picked from commit 4665bb9fc52c626d92f5ca383509c389706f4781) +--- + shared/n-dhcp4/src/n-dhcp4-c-probe.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/shared/n-dhcp4/src/n-dhcp4-c-probe.c b/shared/n-dhcp4/src/n-dhcp4-c-probe.c +index 5bed15b..f4962d6 100644 +--- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c ++++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c +@@ -1005,9 +1005,9 @@ static int n_dhcp4_client_probe_transition_nak(NDhcp4ClientProbe *probe) { + + probe->state = N_DHCP4_CLIENT_PROBE_STATE_INIT; + probe->ns_deferred = n_dhcp4_gettime(CLOCK_BOOTTIME) + probe->ns_nak_restart_delay; +- probe->ns_nak_restart_delay = C_CLAMP(probe->ns_nak_restart_delay * 2, +- UINT64_C(1000000000 * 2), +- UINT64_C(1000000000 * 300)); ++ probe->ns_nak_restart_delay = C_CLAMP(probe->ns_nak_restart_delay * 2u, ++ UINT64_C(2) * UINT64_C(1000000000), ++ UINT64_C(300) * UINT64_C(1000000000)); + break; + case N_DHCP4_CLIENT_PROBE_STATE_SELECTING: + case N_DHCP4_CLIENT_PROBE_STATE_INIT_REBOOT: diff --git a/debian/patches/n-dhcp4-restart-the-transaction-after-a-NAK.patch b/debian/patches/n-dhcp4-restart-the-transaction-after-a-NAK.patch deleted file mode 100644 index d245597f..00000000 --- a/debian/patches/n-dhcp4-restart-the-transaction-after-a-NAK.patch +++ /dev/null @@ -1,70 +0,0 @@ -From: Beniamino Galvani <bgalvani@redhat.com> -Date: Tue, 7 Jan 2020 12:02:55 +0100 -Subject: n-dhcp4: restart the transaction after a NAK - -It is not enough to set the INIT state after a NAK; a timeout -(ns_deferred) must be set so that it is added to the event fd. The -client retries immediately the first time, so that in the successful -case it gets an address quickly. To avoid flooding the network in case -of servers always replying with NAKs, next attempts are done with -intervals from 2 seconds to 5 minutes using exponential backoff. See -also systemd commit [1]. - -[1] https://github.com/systemd/systemd/commit/1d1a3e0afb85478cda43670b8ed92a6db6c83f3e - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/325 -(cherry picked from commit 218782a9a3c326f5c8cc3ea40dc0cd039060b188) -(cherry picked from commit ae5b9343d2e52917546f228b7a4d3c7fc4fa98ec) ---- - shared/n-dhcp4/src/n-dhcp4-c-probe.c | 10 ++++++---- - shared/n-dhcp4/src/n-dhcp4-private.h | 1 + - 2 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/shared/n-dhcp4/src/n-dhcp4-c-probe.c b/shared/n-dhcp4/src/n-dhcp4-c-probe.c -index 4fb7d38..82a089e 100644 ---- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c -+++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c -@@ -946,7 +946,7 @@ static int n_dhcp4_client_probe_transition_ack(NDhcp4ClientProbe *probe, NDhcp4I - n_dhcp4_client_lease_unref(probe->current_lease); - probe->current_lease = n_dhcp4_client_lease_ref(lease); - probe->state = N_DHCP4_CLIENT_PROBE_STATE_BOUND; -- -+ probe->ns_nak_restart_delay = 0; - break; - - case N_DHCP4_CLIENT_PROBE_STATE_REQUESTING: -@@ -969,7 +969,7 @@ static int n_dhcp4_client_probe_transition_ack(NDhcp4ClientProbe *probe, NDhcp4I - node->event.granted.lease = n_dhcp4_client_lease_ref(lease); - probe->current_lease = n_dhcp4_client_lease_ref(lease); - probe->state = N_DHCP4_CLIENT_PROBE_STATE_GRANTED; -- -+ probe->ns_nak_restart_delay = 0; - break; - - case N_DHCP4_CLIENT_PROBE_STATE_INIT: -@@ -1004,9 +1004,11 @@ static int n_dhcp4_client_probe_transition_nak(NDhcp4ClientProbe *probe) { - return r; - - probe->state = N_DHCP4_CLIENT_PROBE_STATE_INIT; -- -+ probe->ns_deferred = n_dhcp4_gettime(CLOCK_BOOTTIME) + probe->ns_nak_restart_delay; -+ probe->ns_nak_restart_delay = c_clamp(probe->ns_nak_restart_delay * 2, -+ UINT64_C(1000000000 * 2), -+ UINT64_C(1000000000 * 300)); - break; -- - case N_DHCP4_CLIENT_PROBE_STATE_SELECTING: - case N_DHCP4_CLIENT_PROBE_STATE_INIT_REBOOT: - case N_DHCP4_CLIENT_PROBE_STATE_INIT: -diff --git a/shared/n-dhcp4/src/n-dhcp4-private.h b/shared/n-dhcp4/src/n-dhcp4-private.h -index fcfb0f3..c092ae8 100644 ---- a/shared/n-dhcp4/src/n-dhcp4-private.h -+++ b/shared/n-dhcp4/src/n-dhcp4-private.h -@@ -352,6 +352,7 @@ struct NDhcp4ClientProbe { - unsigned int state; /* current probe state */ - uint64_t ns_deferred; /* timeout for deferred action */ - uint64_t ns_reinit; -+ uint64_t ns_nak_restart_delay; /* restart delay after a nak */ - NDhcp4ClientLease *current_lease; /* current lease */ - - NDhcp4CConnection connection; /* client connection wrapper */ diff --git a/debian/patches/series b/debian/patches/series index 91470b4d..65e40d3b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,8 +1,6 @@ Force-online-state-with-unmanaged-devices.patch Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch -n-dhcp4-allow-calling-listen-on-already-listening-connect.patch -n-dhcp4-restart-the-transaction-after-a-NAK.patch -dhcp-nettools-handle-retracted-event-as-expired.patch +n-dhcp4-fix-integer-context-in-n_dhcp4_client_probe_trans.patch # Ubuntu patches Provide-access-to-some-of-NM-s-interfaces-to-whoopsie.patch |