Bug #12959
opendhcplease process wrongly update host file if client-hostname is empty
0%
Description
I've activated "Register DHCP leases in DNS forwarder" option.
I case where one of my device requests an IP without giving a hostname (which does not comply with RFC 2132), the file /var/dhcpd/var/db/dhcpd.leases contains entries like client-hostname "";
In that particular case, dhcplease process that writes in /etc/hosts puts the last non empty client-hostname value. Which makes DNS resolution points to an incorrect IP address...
Observed in 2.5.1 and also in 2.6.0
Updated by Jim Pingle about 1 year ago
- Category changed from DNS Forwarder to DHCP (IPv4)
Updated by Viktor Gurov about 1 year ago
- Status changed from New to Feedback
Unable to reproduce on 2.7.0.a.20220327.0600
Could you show an example of /var/dhcpd/var/db/dhcpd.leases entries? (you can replace sensitive data with ***)
Updated by Max Bal about 1 year ago
lease 172.16.8.16 {
starts 1 2022/03/28 15:23:31;
ends 1 2022/03/28 15:25:01;
cltt 1 2022/03/28 15:23:31;
binding state active;
next binding state free;
rewind binding state free;
dynamic-bootp;
hardware ethernet :**::b5:07:f2;
uid "\000SWITCH";
client-hostname "";
}
Updated by Georgiy Tyutyunnik 11 months ago
Also unable to reproduce.
Tested on:
22.05-RELEASE (amd64)
built on Wed Jun 22 18:56:13 UTC 2022
FreeBSD 12.3-STABLE