Keav4: Allow setting option 43 data for subnets#9860
Closed
Holladiewal wants to merge 4 commits intoopnsense:masterfrom
Closed
Keav4: Allow setting option 43 data for subnets#9860Holladiewal wants to merge 4 commits intoopnsense:masterfrom
Holladiewal wants to merge 4 commits intoopnsense:masterfrom
Conversation
This allows setting a raw data value for the IPv4 DHCP option 43 There is minimal validation in place (it must look like a hex string) There will be no help encoding the value, we expect a fully compliant TLV-String
Member
|
Preferably I need some people to test this before merging, @Holladiewal can you ask people in the other PR to test yours? I'll keep this open for a bit to collect feedback. |
Kea seems to be quite picky about the suboptions being in order. This is most likely an issue, since we do not use the kea interface to build up the option, but rather specifying the data ourselves. For now, there is a hint in the help text reminding the operator.
This reverts commit f3b062e. Actually, kea is smart enough to figure it out and reorders the options, so they are in order. I do not see anything in the RFC mention they _have_ to be in order, but it makes everybodies job easier in parsing if they are.
If we can set the option for the subnet, we should also be able to set it for a reservation.
Author
Member
|
@Holladiewal The hint about We might be able to solve the whole subset of problems with such an approach, but since KEA is weird we also might not. But I will investigate this here: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This idea is based on #7361, and I am aware of concerns and issues regarding complexity and client-classes raised in that PR.
However I think offering the ability to set option 43 data is still important, even if there is no hand-holding by the UI to get the right values and not caring about client-classes.
If a client wants some option 43 data, there is only on set of data to choose from per subnet.
This PR allows just that: Setting the value delivered to the clients.
Nothing more, nothing less.
This could be expanded by offering help encoding values (for example encoding an ASCII-String into a hex-string).
Below is a picture of config and outcome (I had to set "always-send" so ubuntu would get the option. That should probably be exposed as a checkbox to the user):
