Closed ghost closed 5 years ago
The output above does not mean leasetime is not working correctty for static leases. Internally odhcpd set the remaining leasetime to infinite for static leases by design; however it sends in the leasetime option the configured leasetime of 12 hours to the client. This can be verified by checking the DHCP exchange between the client and the server.
Pardon my ignorance, but what means internally? As opposed to what is then externally?
Checked the logs and this exchange is lodged every 6 hours
06-15T18:51:27 odhcpd: received DHCPV4_MSG_REQUEST from 3e:10:d5:86:9f:67 06-15T18:51:27 odhcpd: Sent DHCPV4_MSG_ACK to ff:ff:ff:ff:ff:ff - 255.255.255.255 06-16T00:51:27 odhcpd: received DHCPV4_MSG_REQUEST from 3e:10:d5:86:9f:67 06-16T00:51:27 odhcpd: Sent DHCPV4_MSG_ACK to ff:ff:ff:ff:ff:ff - 255.255.255.255 06-16T06:51:27 odhcpd: received DHCPV4_MSG_REQUEST from 3e:10:d5:86:9f:67 06-16T06:51:27 odhcpd: Sent DHCPV4_MSG_ACK to ff:ff:ff:ff:ff:ff - 255.255.255.255 06-16T12:51:27 odhcpd: received DHCPV4_MSG_REQUEST from 3e:10:d5:86:9f:67 06-16T12:51:27 odhcpd: Sent DHCPV4_MSG_ACK to ff:ff:ff:ff:ff:ff - 255.255.255.255 06-16T18:51:27 odhcpd: received DHCPV4_MSG_REQUEST from 3e:10:d5:86:9f:67 06-16T18:51:27 odhcpd: Sent DHCPV4_MSG_ACK to ff:ff:ff:ff:ff:ff - 255.255.255.255 06-17T00:51:27 odhcpd: received DHCPV4_MSG_REQUEST from 3e:10:d5:86:9f:67 06-17T00:51:27 odhcpd: Sent DHCPV4_MSG_ACK to ff:ff:ff:ff:ff:ff - 255.255.255.255
Don't worry about ignorance; with internally I mean the expiry time of the lease in the internal leasetable. Externally is the leasetime sent in the DHCP leasetime option; for a leasetime of 12 hours the renew time is 6 hours which is in line with the logs above.
Just a bit confusing, as in I felt inclined to open this issue, for the user to be displayed in LuCI the internal value
to some extent this seems to have been mentioned some 3 years ago https://github.com/openwrt/odhcpd/issues/83