Project

General

Profile

Actions

Bug #12959

open

dhcplease process wrongly update host file if client-hostname is empty

Added by Max Bal about 2 years ago. Updated 7 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
DHCP (IPv4)
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Default
Affected Version:
2.5.1
Affected Architecture:

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

Actions #1

Updated by Jim Pingle about 2 years ago

  • Category changed from DNS Forwarder to DHCP (IPv4)
Actions #2

Updated by Viktor Gurov almost 2 years 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 ***)

Actions #3

Updated by Max Bal almost 2 years 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 "";
}

Actions #4

Updated by Georgiy Tyutyunnik over 1 year 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

Actions #5

Updated by Azamat Khakimyanov 7 months ago

I wasn't able to reproduce it on 2.5 or 2.6 or 2.7

When I enabled 'don't send hostname' option on my Ubuntu PCs, and with "Register DHCP leases in DNS forwarder" option enabled, in /Status/DHCP Lease in 'Hostname' column I just saw IPs for my Ubuntu hosts.
In /var/dhcpd/var/db/dhcpd.leases DHCP entries didn't have 'client-hostname' and nothing was added into /etc/hosts.

Actions

Also available in: Atom PDF