Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhclient keeps complaining about unknown DHCP option #219

Open
2 tasks done
mvglasow opened this issue Sep 7, 2024 · 4 comments
Open
2 tasks done

dhclient keeps complaining about unknown DHCP option #219

mvglasow opened this issue Sep 7, 2024 · 4 comments
Labels
upstream Third party issue

Comments

@mvglasow
Copy link

mvglasow commented Sep 7, 2024

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

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:

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

Expected behavior

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

Describe alternatives you considered

Reconfigure the DNS server to not set any obscure options OPNsense does not need or understand. However, the DNS 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 OPNsense does not understand.

Screenshots

If applicable, add screenshots to help explain your problem.

Relevant log files

See above – it is really just one line.

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.

Should this not be the right place to file an issue against dhclient in OPNsense, feel free to move it or let me know where to report this.

Environment

OPNsense 24.7.3_1-amd64

@fichtner fichtner transferred this issue from opnsense/core Sep 8, 2024
@fichtner
Copy link
Member

fichtner commented Sep 8, 2024

Feel free to take this to FreeBSD, this is a minor annoyance at best.

@fichtner fichtner added the upstream Third party issue label Sep 8, 2024
@mvglasow
Copy link
Author

mvglasow commented Sep 8, 2024

@mvglasow
Copy link
Author

A patch has been suggested for FreeBSD, which silences warnings for this specific DHCP option; the same has been done for other DHCP options before. Once this gets merged (if it does, see below), receiving this particular DHCP option will not cause any more error messages in the log.

There seems to be some discussion among the FreeBSD folks regarding this approach, as the list of options to ignore is likely to grow further.

The workaround for this kind of behavior is to add

ignore option-125;

in the dhclient.conf file. On OPNsense, I understand, this would go into /var/etc/dhclient.{$IFNAME}.conf. However, this change does not take effect immediately, and when I bring the interface down and up again, the config file gets recreated (and this kind of under-the-hood tinkering probably wasn’t a good idea to begin with, for a number of reasons).

I just took a look at the GUI (Interfaces > [{$IFNAME}] > DHCP client configuration), and even in Advanced mode, the GUI does not offer an option for this – I would have to use Config File Override and supply an entire config file from scratch.

Should the fix get rejected in FreeBSD, I would suggest exposing the ignore DHCP client option in the advanced GUI – or being able to add custom options to an otherwise autogenerated config. Even with the fix for 0x7d merged into FreeBSD, having one of these configuration options would be useful, as I might not be the last user to have this issue and this particular DHCP option might not be the only one to trigger it.

@mvglasow
Copy link
Author

The fix has been committed to FreeBSD today and should be on stable branches in two weeks. That would scratch my present itch and I would, for the moment, no longer have an acute need to add ignore-option through the GUI. If anyone wants to go ahead and expose this config option via the GUI, of course, I won’t stop anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Third party issue
Development

No branches or pull requests

2 participants