-
Notifications
You must be signed in to change notification settings - Fork 330
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
T6773: RFC-2136 support for Kea DHCP4 server #4153
base: current
Are you sure you want to change the base?
Conversation
❌ |
✅ No issues found in unused-imports check.. Please refer the workflow run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is good, I left some ideas for improvements in the review.
|
||
data = kea_parse_ddns_settings(config) | ||
|
||
return dumps(data, indent=8)[1:-1] + ',' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels rather fragile. Do you think it's possible to rework the logic so that the JSON in question is produced from a dict at once, rather than by glueing chunks together?
@@ -0,0 +1,19 @@ | |||
<!-- include start from dhcp/ddns-dns-server.xml.i --> | |||
<tagNode name="dns-server"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Kea's config, the ip-address
is the required option and the "primary key" of server entries. It also has hostname
key which is currently ignored, but that we could add to make servers easier to identify visually.
My feeling is that the server number here is just extra information — as far as I can see from the docs, the order of servers in the list has no special meaning to Kea.
Unless I'm missing anything here, I would make it set dns-server ns1.example.com ip-address 192.0.2.10
(which would generate {'ip-address': '192.0.2.10', 'hostname': 'ns1.example.com'}
).
"dhcp-ddns": { | ||
"enable-updates": true, | ||
"server-ip": "127.0.0.1", | ||
"server-port": 53001, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if these ports should be configurable, in case someone is already running something on 53001.
CI integration ❌ failed! Details
|
Did a few cosmetic things. Please let me know what you think about generating that config, DNS servers list and the port 53001 for d2 and I'll get it fixed within a few days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be an issue in the XML definition stopping the CI tests. I will try find time later to pinpoint the failing syntax.
Change Summary
This PR introduces support for RFC-2136 DDNS updates in Kea DHCP4 server.
Types of changes
Related Task(s)
https://vyos.dev/T6773
Related PR(s)
vyos/vyos-documentation#1561
Component(s) name
dhcp-server
Proposed changes
Introduces new configuration parameters under service dhcp-server and the logic to translate it into Kea 2.4.1 configuration language.
How to test
Set up a Technitium DNS in a container inside VyOS. Set up DDNS updates as follows:
Get the DHCP server to issue some leases and check if the DNS server gets updated.
Smoketest result
Checklist: