Bug 217978 - dhclient: Support supersede statement for option 54
Summary: dhclient: Support supersede statement for option 54
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Kevin Bowling
URL:
Keywords: easy
Depends on:
Blocks:
 
Reported: 2017-03-21 14:59 UTC by fabian.kurtz
Modified: 2021-08-26 00:05 UTC (History)
7 users (show)

See Also:
kbowling: mfc-stable13+
kbowling: mfc-stable12+
kbowling: mfc-stable11+


Attachments
Changes to enable supersede statement for option 54 (75.52 KB, text/plain)
2017-03-21 14:59 UTC, fabian.kurtz
no flags Details
clean patch for 11.0 (1.57 KB, patch)
2017-04-24 04:14 UTC, Franco Fichtner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fabian.kurtz 2017-03-21 14:59:07 UTC
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).
Comment 1 Franco Fichtner 2017-04-24 04:14:49 UTC
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
Comment 2 fabian.kurtz 2017-04-30 16:40:38 UTC
(In reply to Franco Fichtner from comment #1)
Thanks, the patch looks good to me.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-08-18 17:16:09 UTC
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(-)
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2021-08-20 01:00:25 UTC
^Triage: Assign to committer resolving
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-08-25 23:54:53 UTC
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(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-08-26 00:03:58 UTC
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(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-08-26 00:05:00 UTC
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(-)
Comment 8 Kevin Bowling freebsd_committer freebsd_triage 2021-08-26 00:05:39 UTC
Thanks for the patch!