summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-server/kea-dhcp4.conf.j2
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2024-01-07 21:41:23 +0100
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2024-01-10 00:42:22 +0100
commit74ddb29c6c9ce31450234e77fd39c73d0d51c3c5 (patch)
tree9e50995c79176629e5dc5641d91e0bac24d5fb10 /data/templates/dhcp-server/kea-dhcp4.conf.j2
parentdaffee2cbf001dab13799f5b2b69330162491214 (diff)
downloadvyos-1x-74ddb29c6c9ce31450234e77fd39c73d0d51c3c5.tar.gz
vyos-1x-74ddb29c6c9ce31450234e77fd39c73d0d51c3c5.zip
dhcp: T3316: Fix `listen-address` handling and add `listen-interface` as supported by Kea
Diffstat (limited to 'data/templates/dhcp-server/kea-dhcp4.conf.j2')
-rw-r--r--data/templates/dhcp-server/kea-dhcp4.conf.j28
1 files changed, 8 insertions, 0 deletions
diff --git a/data/templates/dhcp-server/kea-dhcp4.conf.j2 b/data/templates/dhcp-server/kea-dhcp4.conf.j2
index 6ab13ab27..629fa952a 100644
--- a/data/templates/dhcp-server/kea-dhcp4.conf.j2
+++ b/data/templates/dhcp-server/kea-dhcp4.conf.j2
@@ -1,8 +1,16 @@
{
"Dhcp4": {
"interfaces-config": {
+{% if listen_address is vyos_defined %}
+ "interfaces": {{ listen_address | kea_address_json }},
+ "dhcp-socket-type": "udp",
+{% elif listen_interface is vyos_defined %}
+ "interfaces": {{ listen_interface | tojson }},
+ "dhcp-socket-type": "raw",
+{% else %}
"interfaces": [ "*" ],
"dhcp-socket-type": "raw",
+{% endif %}
"service-sockets-max-retries": 5,
"service-sockets-retry-wait-time": 5000
},