I've tested the package from -proposed and I can confirm it fixes the
problem:

Installed from -proposed:

root@ubuntu:~# apt-cache policy klibc-utils
klibc-utils:
  Installed: 2.0.4-9ubuntu2.2
  Candidate: 2.0.4-9ubuntu2.18.04.1
  Version table:
     2.0.4-9ubuntu2.18.04.1 500
        500 http://ppa.launchpad.net/mfo/lp1947099/ubuntu bionic/main amd64 
Packages
 *** 2.0.4-9ubuntu2.2 500
        500 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     2.0.4-9ubuntu2.1 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 
Packages
     2.0.4-9ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages


Working well without timeout:

root@ubuntu:~# ip l set dev ens9 down
root@ubuntu:~# date; /usr/lib/klibc/bin/ipconfig ens9; date
Thu May 12 12:54:48 UTC 2022
IP-Config: ens9 hardware address 52:54:00:f3:4e:0e mtu 1500 DHCP RARP
IP-Config: ens9 complete (dhcp from 192.168.150.2):
 address: 192.168.150.105  broadcast: 192.168.150.255  netmask: 255.255.255.0   
 gateway: 192.168.150.1    dns0     : 192.168.150.2    dns1   : 0.0.0.0         
 domain : sts.lab                                                         
 rootserver: 192.168.150.2 rootpath: 
 filename  : 
Thu May 12 12:55:01 UTC 2022


Timeout being honored:

root@ubuntu:~# ip l set dev ens9 down
root@ubuntu:~# date; /usr/lib/klibc/bin/ipconfig -t 2 ens9; date
Thu May 12 12:55:44 UTC 2022
IP-Config: ens9 hardware address 52:54:00:f3:4e:0e mtu 1500 DHCP RARP
Lowered timeout to match user request = (2 s) 
IP-Config: no response after 2 secs - giving up
Thu May 12 12:55:46 UTC 2022


Testing the original issue (timeout being ignored when not receiving any reply 
from a DHCP Server), which is now also getting honored:

root@ubuntu:~# ip l set dev ens9 down
root@ubuntu:~# date; /usr/lib/klibc/bin/ipconfig -t 2 ens9; date
Thu May 12 12:56:32 UTC 2022
IP-Config: ens9 hardware address 52:54:00:f3:4e:0e mtu 1500 DHCP RARP
Lowered timeout to match user request = (2 s) 
IP-Config: no response after 2 secs - giving up
Thu May 12 12:56:34 UTC 2022

root@ubuntu:~# ip l set dev ens9 down
root@ubuntu:~# date; /usr/lib/klibc/bin/ipconfig -t 5 ens9; date
Thu May 12 12:56:43 UTC 2022
IP-Config: ens9 hardware address 52:54:00:f3:4e:0e mtu 1500 DHCP RARP
Lowered timeout to match user request = (5 s) 
IP-Config: no response after 5 secs - giving up
Thu May 12 12:56:48 UTC 2022

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1947099

Title:
  ipconfig does not honour user-requested timeouts in some cases

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/1947099/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to