Created attachment 181028 [details] Changes to enable supersede statement for option 54 The German cable internet provider Unitymedia (and possibily other ISPs from the Liberty Global group) 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. The problem can be avoided by setting DHCP option 54 (dhcp-server-identifier) to 255.255.255.255. However, the required supersede statement for this option is not implemented in dhclient.c. Thus the DHCP client 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).
Created attachment 182031 [details] clean patch for 11.0 I believe the attached patch is the essence of this request. The author hasn't given feedback yet, maybe Fabian could do this via this tracker instead? Cheers, Franco
(In reply to Franco Fichtner from comment #1) Thanks, the patch looks good to me.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=0a539a0f005e8acbe4974ede30aa928099c988b9 commit 0a539a0f005e8acbe4974ede30aa928099c988b9 Author: Fabian Kurtz <fabian.kurtz@udo.edu> AuthorDate: 2021-08-18 17:12:48 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-08-18 17:15:28 +0000 dhclient: support supersede statement for option 54 PR: 217978 Reported by: Franco Fichtner <franco@opnsense.org> Reviewed by: markj Obtained from: OPNsense MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31503 sbin/dhclient/dhclient.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
^Triage: Assign to committer resolving
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=8751bff1a72e55a7829881c583baca77d373f0cf commit 8751bff1a72e55a7829881c583baca77d373f0cf Author: Fabian Kurtz <fabian.kurtz@udo.edu> AuthorDate: 2021-08-18 17:12:48 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-08-25 23:54:05 +0000 dhclient: support supersede statement for option 54 PR: 217978 Reported by: Franco Fichtner <franco@opnsense.org> Reviewed by: markj Obtained from: OPNsense MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31503 (cherry picked from commit 0a539a0f005e8acbe4974ede30aa928099c988b9) sbin/dhclient/dhclient.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=663441de575dbdd38275d298ba220a4dc871f14b commit 663441de575dbdd38275d298ba220a4dc871f14b Author: Fabian Kurtz <fabian.kurtz@udo.edu> AuthorDate: 2021-08-18 17:12:48 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-08-26 00:02:21 +0000 dhclient: support supersede statement for option 54 PR: 217978 Reported by: Franco Fichtner <franco@opnsense.org> Reviewed by: markj Obtained from: OPNsense MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31503 (cherry picked from commit 0a539a0f005e8acbe4974ede30aa928099c988b9) sbin/dhclient/dhclient.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
A commit in branch stable/11 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=c4055d704360af150d4c9f535aef7a53e99f9d75 commit c4055d704360af150d4c9f535aef7a53e99f9d75 Author: Fabian Kurtz <fabian.kurtz@udo.edu> AuthorDate: 2021-08-18 17:12:48 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-08-26 00:03:54 +0000 dhclient: support supersede statement for option 54 PR: 217978 Reported by: Franco Fichtner <franco@opnsense.org> Reviewed by: markj Obtained from: OPNsense MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31503 (cherry picked from commit 0a539a0f005e8acbe4974ede30aa928099c988b9) sbin/dhclient/dhclient.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
Thanks for the patch!