Feature #7416


Dhclient does not support supersede statement for option 54

Added by Fabian Kurtz over 4 years ago. Updated almost 3 years ago.

Needs Patch
Target version:
Start date:
Due date:
% Done:


Estimated time:
2.00 h
Plus Target Version:
Release Notes:


The German cable internet provider Unitymedia uses DHCP relays which only answer to broadcasts. Dhclient renews WAN leases by sending unicasts to the relay, which doesn't forward them to the DHCP server. If, in the rebind phase, the broadcast packet is lost, the WAN IP expires, all connections are dropped and Dhclient needs to aquire a new lease. This is discussed in [[]].

The problem can be avoided by setting DHCP option 54 (dhcp-server-identifier) to via Interfaces->WAN->Advanced configuration->Option Modifiers. However, the required supersede statement for this option is not implemented in dhclient.c. Thus the DHCP client of Pfsense does not use the option and the value given by the DHCP server remains in effect (which points to the IP of the relay), which then results in the observed problem.

To solve this a section which checks if "supersede dhcp-server-identifier" is set has been added to dhclient.c (see "Start of the updated section" at line 855 in the attached file).


dhclient.c (75.2 KB) dhclient.c Fabian Kurtz, 03/21/2017 08:53 AM
Actions #1

Updated by Jim Pingle over 4 years ago

  • Status changed from New to Needs Patch
  • Priority changed from High to Low
  • Target version changed from 2.3.4 to Future

Changes to FreeBSD should first be submitted upstream to FreeBSD.

Actions #2

Updated by Jens Groh almost 3 years ago

Jim Pingle

I maybe wrong but isn't that the corresponding fix/workaround from upstream to this particular problem?
Could anyone implement this so we can test it, too?

Actions #3

Updated by Jim Pingle almost 3 years ago

Might be, but it's still an open issue and hasn't been accepted into FreeBSD yet. There isn't even one person on that issue that has actually tested it to confirm it solves the original problem. I don't see it getting pulled into pfSense without at least some confirmation that it works.

Actions #4

Updated by Jens Groh almost 3 years ago

I beg to differ and hope I'm not mistaken, but AFAIK Franco pulled that already into OPNsense and the last statement of Fabian is IMHO based on him testing it in a newer release which - as was told to me in the german subforums - now has the changes in dhclient and can set option 54 to broadcast and this far seems to have that specific problem solved. Pulling it into a snapshot would make it easier for others to test.
Rico has alerady started with a bit crude build of dhclient in the german subforums (see: but for wider tests a snapshot with it would come in handy. I know it's perhaps a very localized problem but as cable providers in Germany are gaining more and more customers, there are still more users that fall over that specific bug.

At least it would help a few of us german outsiders, that are stuck with a certain cable provider :)

Actions #5

Updated by Jim Pingle almost 3 years ago

The reply on the FreeBSD PR is ambiguous at best. It would also help if someone that was actually a part of the FreeBSD project was involved in that PR, or at least a patch review from FreeBSD.

We aren't in the habit of applying patches first and testing them later when they come from outside sources like that.

It appears simple, but the last time something broke dhclient is was very painful for a large number of people, and I'm not inclined to repeat the experience.

Actions #6

Updated by Fabian Kurtz almost 3 years ago

The patch fixed it in OPNSense in 2017. It has been running flawlessly ever since. That's the only feedback I can provide on this.


Also available in: Atom PDF