summaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2025-08-19 15:25:31 +0100
committerGitHub <noreply@github.com>2025-08-19 15:25:31 +0100
commit731e2193322867a89b8ea2c2fd755c174149e9b3 (patch)
treea87c8fbdcf62db5661f74ab32ad1432bfc613cc4 /src/system
parente83507a30cc8082895a39a25052ebee03036b170 (diff)
parent974f9a5d5e13241e2b4ea54152bf835db6b7feff (diff)
downloadvyos-1x-731e2193322867a89b8ea2c2fd755c174149e9b3.tar.gz
vyos-1x-731e2193322867a89b8ea2c2fd755c174149e9b3.zip
Merge pull request #4508 from davi2367/vrf-dhcp
kea: T6211: add VRF support for KEA dhcp server
Diffstat (limited to 'src/system')
-rwxr-xr-xsrc/system/on-dhcp-event.sh2
-rwxr-xr-xsrc/system/sync-dhcp-lease-to-hosts.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/system/on-dhcp-event.sh b/src/system/on-dhcp-event.sh
index 77ac30c3a..492727b3e 100755
--- a/src/system/on-dhcp-event.sh
+++ b/src/system/on-dhcp-event.sh
@@ -30,7 +30,7 @@ get_subnet_domain_name () {
from vyos.kea import kea_get_active_config
from vyos.utils.dict import dict_search_args
-config = kea_get_active_config('4')
+config = kea_get_active_config('4', '')
shared_networks = dict_search_args(config, 'arguments', f'Dhcp4', 'shared-networks')
found = False
diff --git a/src/system/sync-dhcp-lease-to-hosts.py b/src/system/sync-dhcp-lease-to-hosts.py
index fbce4c9ea..ea50b98a3 100755
--- a/src/system/sync-dhcp-lease-to-hosts.py
+++ b/src/system/sync-dhcp-lease-to-hosts.py
@@ -33,17 +33,17 @@ logs_handler = logging.StreamHandler()
logger.addHandler(logs_handler)
-def _get_all_server_leases(inet_suffix='4') -> list:
+def _get_all_server_leases(inet_suffix='4', vrf='') -> list:
mappings = []
try:
- active_config = kea_get_active_config(inet_suffix)
+ active_config = kea_get_active_config(inet_suffix, vrf)
except Exception:
raise vyos.opmode.DataUnavailable('Cannot fetch DHCP server configuration')
try:
pools = kea_get_dhcp_pools(active_config, inet_suffix)
mappings = kea_get_server_leases(
- active_config, inet_suffix, pools, state=[], origin=None
+ active_config, inet_suffix, vrf, pools, state=[], origin=None
)
except Exception:
raise vyos.opmode.DataUnavailable('Cannot fetch DHCP server leases')