--- klibc-2.0.4/debian/patches/0002-Honour-user-specified-timeouts-in-all-cases 1969-12-31 19:00:00.000000000 -0500 +++ klibc-2.0.4/debian/patches/0002-Honour-user-specified-timeouts-in-all-cases 2017-11-09 16:14:08.000000000 -0500 @@ -0,0 +1,42 @@ + klibc (2.0.4-9ubuntu3) bionic; urgency=medium + . + * Honour user-specified timeouts even in error cases. + + klibc (2.0.4-9ubuntu2) bionic; urgency=medium + . + * Write DNS domain in place of DOMAINSEARCH if that wasn't provided by the + DHCP server. (LP: #1713747) + - 0001-Write-DNS-domain-from-DHCP-if-we-have-no-DOMAINSEARC.patch +Author: Mathieu Trudel-Lapierre +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1713747 + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: https://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: 2021-10-14 + +--- klibc-2.0.4.orig/usr/kinit/ipconfig/main.c ++++ klibc-2.0.4/usr/kinit/ipconfig/main.c +@@ -442,6 +442,14 @@ static int loop(void) + if (pending == 0 || (bringup_first && done)) + break; + ++ /* Compensate for already-lost time */ ++ /* Make sure to never exceed user-specified timeouts */ ++ gettimeofday(&now, NULL); ++ if (now.tv_sec + timeout > start + loop_timeout) { ++ timeout = loop_timeout - (now.tv_sec - start); ++ printf("Lowered timeout to match user request = (%d s) \n", timeout); ++ } ++ + timeout_ms = timeout * 1000; + + for (x = 0; x < 2; x++) { diff -Nru klibc-2.0.4/debian/patches/series klibc-2.0.4/debian/patches/series --- klibc-2.0.4/debian/patches/series 2017-11-09 16:13:32.000000000 -0500 +++ klibc-2.0.4/debian/patches/series 2017-11-09 16:14:08.000000000 -0500 @@ -20,3 +20,4 @@ broadcast_dhcp_send.patch dhcp-one-socket-per-interface.patch 0001-Write-DNS-domain-from-DHCP-if-we-have-no-DOMAINSEARC.patch +0002-Honour-user-specified-timeouts-in-all-cases