diff options
Diffstat (limited to 'debian')
| -rw-r--r-- | debian/patches/n-dhcp4-fix-integer-context-in-n_dhcp4_client_probe_trans.patch | 31 | ||||
| -rw-r--r-- | debian/patches/series | 1 |
2 files changed, 32 insertions, 0 deletions
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/series b/debian/patches/series index 9a20acf2..34431f90 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ Force-online-state-with-unmanaged-devices.patch Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch +n-dhcp4-fix-integer-context-in-n_dhcp4_client_probe_trans.patch |