diff options
| author | Daniil Baturin <daniil@vyos.io> | 2025-08-19 15:25:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-19 15:25:31 +0100 |
| commit | 731e2193322867a89b8ea2c2fd755c174149e9b3 (patch) | |
| tree | a87c8fbdcf62db5661f74ab32ad1432bfc613cc4 /src/system | |
| parent | e83507a30cc8082895a39a25052ebee03036b170 (diff) | |
| parent | 974f9a5d5e13241e2b4ea54152bf835db6b7feff (diff) | |
| download | vyos-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-x | src/system/on-dhcp-event.sh | 2 | ||||
| -rwxr-xr-x | src/system/sync-dhcp-lease-to-hosts.py | 6 |
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') |
