summaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
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 47c276270..556d7dbcb 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 5c8b18faf..8baa6992a 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')