dhcp offer ip by client id in dhcpv4 - #6110
Conversation
|
Hi @nmreadelf, sorry for the late reply and thanks for the contribution. As far as I know, RFC-4361 Section 6.1, which updates the referenced RFC-2132, actually forbids using the hardware address in option |
relate #6135 |
|
@EugeneOne1 @ainar-g hello, i resolve merge conflicts, can you make approve again? |
|
@EugeneOne1 @ainar-g hello, Could you please assist in merging this pull request? It has been open for close to a year. |
EugeneOne1
left a comment
There was a problem hiding this comment.
@nmreadelf, good afternoon and apologies for late review. The reactions to the issue proposing this change seem to not have demonstrated the need for it. In addition, you never responded to our concerns about the standard's recommendations. So, we are not ready to merge this change.
You can always keep this feature in your personal fork of AdGuard Home.
|
I rechecked exact head The branch imports both the standard-library More importantly, resolving that compile error would not make the The linked feature request #6135 has received no additional use-case |
compile problem fixed |
fc5fa4a to
9a33c73
Compare
Sil3ntVip3r
left a comment
There was a problem hiding this comment.
Re-reviewed exact head ced76bb47b4499c374131a48c3b2eb411696044d. The import/compile repair is good, but this still is not ready to merge.
-
The current implementation does not solve the scenario in the PR body.
clientMACuses option 61 only whenchaddris nil or all-zero, and the newvalid_chaddr_is_preferredtest makes that explicit. With a nonzero physical-hostchaddrand a legacy type-1 option-61 containing the VM MAC, it still returns the physical-host MAC. All ofhandleDiscover, request handling, and release lookup then use that value, so the VM cannot receive a separate lease. I verified this with a focused disposable test of exactly that packet shape. Please either implement an explicit, end-to-end client-identity policy (including lease lookup/storage and reply-delivery implications) with a regression test for nonzerochaddrplus option 61, or close this PR as it cannot satisfy its stated use case. The current type-255 protection is good, but this fallback is not RFC-4361 client-identity support. -
make go-checkcurrently fails before tests because gofumpt requires a blank line beforeTestV4Server_clientMACininternal/dhcpd/v4_unix_internal_test.go. Please fix that and rerun the gate.
Focused go test -race -count=1 ./internal/dhcpd and go vet ./internal/dhcpd pass on this head; the full gate fails only at the formatter described above.
I have configured a virtual machine that utilizes the host network on my physical machine. Upon examination, I discovered that the AdGuard Home server being hosted offers IP addresses based on the MAC address of the physical host machine rather than the virtual machine itself. Specifically, the actual MAC address of the virtual machine is present in the client-id field of DHCP requests. For proper functionality, the DHCP server should be offering IP addresses based on the client-id field, which contains the MAC address of the virtual machine. This would allow the DHCP server to correctly identify the virtual machine and provide it an IP address accordingly. The current behavior indicates a misconfiguration, where the DHCP server is assigning IP addresses using the physical host's MAC address instead of the virtual machine client's MAC address contained in the DHCP request.
resolve #6135