Project

General

Profile

Actions

Bug #12959

open

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

Added by Max Bal about 1 year ago. Updated 11 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 1 year ago

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

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 ***)

Actions #3

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 "";
}

Actions #4

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

Actions

Also available in: Atom PDF