Versions
- Core version: v6.4.3
- Web version: v6.6
- FTL version: v6.7
- Platform: LXC (Debian), Pi-hole DHCP server
Expected behaviour
For a static DHCP host reservation configured with infinite lease time, the server should grant an infinite lease regardless of what lease time the client requests via DHCP option 51.
Actual behaviour
When a client explicitly requests a specific lease time via DHCP option 51 (Requested Lease Time), FTL grants exactly the client-requested lease time instead of the infinite value configured in the static host reservation.
Steps to reproduce
- Configure a static DHCP host reservation with
infinite lease time:
dhcp-host=EC:FF:3A:39:26:FA,192.168.178.9,Apple-Watch-von-Sascha,infinite
(as generated in /etc/pihole/dnsmasq.conf from the corresponding entry in pihole.toml)
- Have a client (in this case an Apple Watch, watchOS) send a DHCPREQUEST that includes option 51 with a specific lease time (Apple devices commonly request 7776000 seconds / 90 days).
- Observe the DHCPACK from the Pi-hole server.
Evidence (tcpdump)
Client request:
20:27:44.357260 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from ec:ff:3a:39:26:fa, length 300, xid 0xb3b9053
Client-Ethernet-Address ec:ff:3a:39:26:fa
DHCP-Message (53): Request
Client-ID (61): ether ec:ff:3a:39:26:fa
Requested-IP (50): 192.168.178.9
Lease-Time (51): 7776000
Hostname (12): "AppleWaonSascha"
Server reply:
20:27:44.363777 IP 192.168.178.144.67 > 192.168.178.9.68: BOOTP/DHCP, Reply, length 328, xid 0xb3b9053
Your-IP 192.168.178.9
Server-IP 192.168.178.144
DHCP-Message (53): ACK
Lease-Time (51): 7776000
RN (58): 3888000
RB (59): 6804000
The server echoes back the client-requested 7776000 instead of honoring the infinite value from the static host reservation. This is confirmed both in the DHCPACK on the wire and in the resulting /etc/pihole/dhcp.leases entry, which shows a concrete future expiry timestamp instead of 0 (dnsmasq's internal representation of an infinite lease):
1793989192 ec:ff:3a:39:26:fa 192.168.178.9 apple-watch-von-sascha *
For comparison, a static host reservation for a client that does not request a specific lease time correctly shows 0 (infinite) in the leases file:
0 7c:e7:12:6d:d0:d3 192.168.178.17 steamdeck 01:7c:e7:12:6d:d0:d3
Both hosts use the identical dhcp-host=...,infinite syntax in pihole.toml/dnsmasq.conf; the only difference is whether the client sends option 51 in its request.
Additional notes
This was tested with three Apple devices (iPhone, iPad, Apple Watch), all showing the same behaviour, all configured identically to other static reservations (e.g. Steam Deck, various IoT devices) that behave correctly and show Never/infinite expiry. This suggests the issue is specific to how FTL/dnsmasq handles a client-requested lease time (option 51) in combination with an infinite static host reservation, rather than an issue with the reservation config itself.
Config excerpt from pihole.toml:
"EC:FF:3A:39:26:FA,192.168.178.9,Apple-Watch-von-Sascha,infinite",
Generated dnsmasq.conf line:
dhcp-host=EC:FF:3A:39:26:FA,192.168.178.9,Apple-Watch-von-Sascha,infinite
Debug token
https://tricorder.pi-hole.net/yE2Px5wR
Versions
Expected behaviour
For a static DHCP host reservation configured with
infinitelease time, the server should grant an infinite lease regardless of what lease time the client requests via DHCP option 51.Actual behaviour
When a client explicitly requests a specific lease time via DHCP option 51 (Requested Lease Time), FTL grants exactly the client-requested lease time instead of the
infinitevalue configured in the static host reservation.Steps to reproduce
infinitelease time:/etc/pihole/dnsmasq.conffrom the corresponding entry inpihole.toml)Evidence (tcpdump)
Client request:
Server reply:
The server echoes back the client-requested
7776000instead of honoring theinfinitevalue from the static host reservation. This is confirmed both in the DHCPACK on the wire and in the resulting/etc/pihole/dhcp.leasesentry, which shows a concrete future expiry timestamp instead of0(dnsmasq's internal representation of an infinite lease):For comparison, a static host reservation for a client that does not request a specific lease time correctly shows
0(infinite) in the leases file:Both hosts use the identical
dhcp-host=...,infinitesyntax inpihole.toml/dnsmasq.conf; the only difference is whether the client sends option 51 in its request.Additional notes
This was tested with three Apple devices (iPhone, iPad, Apple Watch), all showing the same behaviour, all configured identically to other static reservations (e.g. Steam Deck, various IoT devices) that behave correctly and show
Never/infinite expiry. This suggests the issue is specific to how FTL/dnsmasq handles a client-requested lease time (option 51) in combination with aninfinitestatic host reservation, rather than an issue with the reservation config itself.Config excerpt from
pihole.toml:Generated
dnsmasq.confline:Debug token
https://tricorder.pi-hole.net/yE2Px5wR