Rewrite networking in package dhcpd to only use gopacket #3908

Open
opened 2026-03-04 04:31:57 -05:00 by deekerman · 0 comments
Owner

Originally created by @ainar-g on GitHub (Sep 15, 2022).

Originally assigned to: @EugeneOne1 on GitHub.

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to request a feature or enhancement and not ask a question

Description

What problem are you trying to solve?

Package dhcpd currently uses a lot of different modules and packages for networking, including github.com/google/gopacket, github.com/insomniacslk/dhcp, github.com/mdlayher/ethernet, and the deprecated github.com/mdlayher/raw. This creates all sorts of issues, including but not limited to:

  1. portability;
  2. API compatibility;
  3. difficulty of package update and maintenance.

Proposed solution

Module github.com/google/gopacket seems to have either all or most of the things we require. If I am not mistaken, we could even enable DHCP on Windows, if we make sure that the networking works well there.

Alternatives considered

Go on as we do. See the problems with this approach above.

Originally created by @ainar-g on GitHub (Sep 15, 2022). Originally assigned to: @EugeneOne1 on GitHub. ### Prerequisites - [X] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) and found no answer - [X] I have searched other issues and found no duplicates - [X] I want to request a feature or enhancement and not ask a question ### Description #### What problem are you trying to solve? Package `dhcpd` currently uses a lot of different modules and packages for networking, including `github.com/google/gopacket`, `github.com/insomniacslk/dhcp`, `github.com/mdlayher/ethernet`, and the deprecated `github.com/mdlayher/raw`. This creates all sorts of issues, including but not limited to: 1. portability; 2. API compatibility; 3. difficulty of package update and maintenance. #### Proposed solution Module `github.com/google/gopacket` seems to have either all or most of the things we require. If I am not mistaken, we could even enable DHCP on Windows, if we make sure that the networking works well there. #### Alternatives considered Go on as we do. See the problems with this approach above.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#3908
No description provided.