Subject: | isc-dhclient-4.3.4 and isc-dhclient-4.3.5b1 - environment variable $new_expiry wrong for very high lease time |
Date: | Wed, 5 Oct 2016 10:37:13 +0000 |
To: | dhcp-bugs@isc.org |
From: | "Dominique Jullier" <doj@open.ch> |
Bug Report from www.isc.org:
Name: Dominique Jullier
Email: doj@open.ch
Software Version: isc-dhclient-4.3.4 and isc-dhclient-4.3.5b1
OS: Linux from Scratch
Subject:environment variable $new_expiry wrong for very high lease time
Bug Detail
===========
On Azure, the dhcp server offers a lease time of ~135 years, which seems to cause some issues. There was a bug report a couple of years ago for various distros:
http://pkgs.fedoraproject.org/cgit/rpms/dhcp.git/commit/?id=bd413ec3f9585ff8ccb8a5a66097fab53a8f5fe4
Looks a bit like I'm hitting the same error again (regression?):
# /opt/OSAGdhcp/sbin/dhclient -v eth1
Internet Systems Consortium DHCP Client 4.3.4
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/00:0d:3a:24:12:91
Sending on LPF/eth1/00:0d:3a:24:12:91
Sending on Socket/fallback
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 168.63.129.16
Unable to set up timer: out of range
If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging..
exiting.
I applied then the patch recommended in the bug report in 2012 mentioned above:
...
++ */
++ if (sec > TIME_MAX)
++ sec = TIME_MAX - 9;
++
++ isc_interval_set(&interval, sec, usec * 1000);
...
This solved the issue for the first moment:
[obsd:~]# /opt/OSAGdhcp/sbin/dhclient -v eth1
Internet Systems Consortium DHCP Client 4.3.5b1
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/00:0d:3a:24:12:91
Sending on LPF/eth1/00:0d:3a:24:12:91
Sending on Socket/fallback
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 168.63.129.16
bound to 10.0.1.200 -- renewal in 4294967295 seconds.
All looks seemingly good, but unfortunately, the variable $new_expiry passed over to the dhclient-script does not contain 4294967295 as expected (see also output above) but the current time.
Interestingly, in the dhclient.leases file the value is again correct.
tcpdump:
# tcpdump -ni eth1 port 67 or port 68 -vvvv
tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
12:34:25.696665 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:0d:3a:24:12:91, length 300, xid 0xc01d6b3c, Flags [none] (0x0000)
Client-Ethernet-Address 00:0d:3a:24:12:91
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Parameter-Request Option 55, length 7:
Subnet-Mask, BR, Time-Zone, Default-Gateway
Domain-Name, Domain-Name-Server, Hostname
END Option 255, length 0
PAD Option 0, length 0, occurs 47
12:34:25.710260 IP (tos 0x0, ttl 255, id 53331, offset 0, flags [none], proto UDP (17), length 367)
168.63.129.16.67 > 255.255.255.255.68: [no cksum] BOOTP/DHCP, Reply, length 339, hops 1, xid 0xc01d6b3c, Flags [Broadcast] (0x8000)
Your-IP 10.0.1.200
Server-IP 168.63.129.16
Gateway-IP 168.63.129.16
Client-Ethernet-Address 00:0d:3a:24:12:91
sname "RD7CFE90D2F502"
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
Subnet-Mask Option 1, length 4: 255.255.255.0
Domain-Name-Server Option 6, length 4: 168.63.129.16
Domain-Name Option 15, length 51: "n0asurwq3bsufpahkrhd2d4cfe.ax.internal.cloudapp.net"
Lease-Time Option 51, length 4: 4294967295
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: 168.63.129.16
RN Option 58, length 4: 4294967295
RB Option 59, length 4: 4294967295
T245 Option 245, length 4: 2822734096
END Option 255, length 0
12:34:25.710746 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:0d:3a:24:12:91, length 300, xid 0xc01d6b3c, Flags [none] (0x0000)
Client-Ethernet-Address 00:0d:3a:24:12:91
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
Server-ID Option 54, length 4: 168.63.129.16
Requested-IP Option 50, length 4: 10.0.1.200
Parameter-Request Option 55, length 7:
Subnet-Mask, BR, Time-Zone, Default-Gateway
Domain-Name, Domain-Name-Server, Hostname
END Option 255, length 0
PAD Option 0, length 0, occurs 35
12:34:25.722133 IP (tos 0x0, ttl 255, id 54611, offset 0, flags [none], proto UDP (17), length 367)
168.63.129.16.67 > 255.255.255.255.68: [no cksum] BOOTP/DHCP, Reply, length 339, hops 1, xid 0xc01d6b3c, Flags [Broadcast] (0x8000)
Your-IP 10.0.1.200
Server-IP 168.63.129.16
Gateway-IP 168.63.129.16
Client-Ethernet-Address 00:0d:3a:24:12:91
sname "RD7CFE90D2F502"
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
Subnet-Mask Option 1, length 4: 255.255.255.0
Domain-Name-Server Option 6, length 4: 168.63.129.16
Domain-Name Option 15, length 51: "n0asurwq3bsufpahkrhd2d4cfe.ax.internal.cloudapp.net"
Lease-Time Option 51, length 4: 4294967295
DHCP-Message Option 53, length 1: ACK
Server-ID Option 54, length 4: 168.63.129.16
RN Option 58, length 4: 4294967295
RB Option 59, length 4: 4294967295
T245 Option 245, length 4: 2822734096
END Option 255, length 0
Thanks for having a look at this issue and let me know if you need more information.
Dominique Jullier
---
This email was received through isc.org Bug Submission Form
All information within this email is considered confidential and for internal use only.