[Bug 281361] ddclient: messages about unknown DHCP option keep cluttering the log

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 08 Sep 2024 11:57:30 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281361

            Bug ID: 281361
           Summary: ddclient: messages about unknown DHCP option keep
                    cluttering the log
           Product: Base System
           Version: 14.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: michael@vonglasow.com

I keep getting the following error message in the log every time the IP config
on the external interface is renewed (15 minutes with my ISP):

> Error:dhclient:unknown dhcp option value 0x7d

**To Reproduce**

Steps to reproduce the behavior:

* Set up a network with a DHCP server.
* Configure the DHCP server to send an unknown DHCP option (0x7d is known to
work)
* Configure a short timeout (under an hour) for DHCP leases.
* Configure DHCP on one interface, and connect it to the network with DHCP
server configured in the previous steps.
* Observe the log

**Expected behavior**

I would expect ddclient to silently ignore any options it does not understand
(which is the recommended standard behavior for most parsers). If it does log a
message at all, the log level should be Debug or Information at most, not
Error.

**Describe alternatives you considered**

Reconfiguring the DHCP server to not set any obscure options ddclient does not
need or understand is not an option: the DHCP server is beyond my control (I
probably won’t get my ISP to configure their DHCP server the way I think it
should be), and since lease times are such that renewals happen every 15
minutes, this really clutters up the logs. There may certainly be legit use
cases why a DHCP server would specify DHCP options which some DHCP clients do
not understand.

**Additional context**

I’ve verified DHCP traffic with a packet capture tool, and the DHCP offer
indeed does have the unsupported option in it.

The log entry has been around for a few versions and might have been present
ever since I started using OPNsense on that particular ISP.

It makes the logs hard to read when you’re trying to debug something,
especially since it is logged as an error. The lower the log level, the easier
it is to filter out.

Should I have filed this bug against the wrong component, please feel free to
move it or let me know where it should go.

**Environment**

OPNsense 24.7.3_1-amd64 (based on FreeBSD 14.1-release-p3); Franco Fichtner
suggested I file my issue as a bug here (however, I don’t agree with him that
this is just a minor annoyance)

-- 
You are receiving this mail because:
You are the assignee for the bug.