-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DHCP scope option 6 (name_server
) breaks when using value64
attribute
#768
Comments
when using value64 you're responsible for encoding the values correctly yourself |
Maybe I'm missing something then, but |
@tigattack The issue is you're converting UTF-8 (Text) to Base64. you need to convert decimal (Number) to Base64. this took me a while to figure out. Red Markings are there for aid |
Thank you @july12123, good spot! |
Probably a good shout to document this, @BeryJu. I'd happily do it myself, but I'm not sure which options this may be necessary for, so I'll leave it to you to ensure accuracy. I believe the DHCP options page and docs for the Terraform provider's |
When applying the
name_server
option as shown in the example below, it appears to break the data served to DHCP clients.For example, dhclient successfully retrieves a lease, but warns:
domain-name-servers 2 extra bytes at end of array
The result is that dhclient appears to parse this as
49.48.46.53,49.46.49.48,46.50.48.49,48.46.53.50,46.49.48.46
rather than the configured base64 representation of[10.51.10.20,10.52.10.20]
.The following configuration works fine, but means I can only pass a single DNS server to the client (unless I'm unaware of some syntax which makes this possible?).
Note: the issue appears to be present regardless of the number of servers specified (tested with 1-3). The only difference is the warning from dhclient notes a differing number of extra bytes at the end of the array.
The text was updated successfully, but these errors were encountered: