diff options
author | Simon <965089+sarthurdev@users.noreply.github.com> | 2024-11-25 16:55:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 16:55:36 +0100 |
commit | efd86e5cbaf2cae68e431b83f6ca6c0093672e89 (patch) | |
tree | bd164764645c492d68a80067895c145bdcae2c8c /src | |
parent | ec18cc393591052fd1f021c4a62220ab2e537a2e (diff) | |
parent | 4e49794fcf554b038b1f6613af7fec848f24cefe (diff) | |
download | vyos-1x-efd86e5cbaf2cae68e431b83f6ca6c0093672e89.tar.gz vyos-1x-efd86e5cbaf2cae68e431b83f6ca6c0093672e89.zip |
Merge pull request #4203 from sarthurdev/T6692
dhcp: T6692: Fix range options not present when `exclude` is used
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/service_dhcp-server.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/service_dhcp-server.py b/src/conf_mode/service_dhcp-server.py index e89448e2d..9c59aa63d 100755 --- a/src/conf_mode/service_dhcp-server.py +++ b/src/conf_mode/service_dhcp-server.py @@ -87,6 +87,10 @@ def dhcp_slice_range(exclude_list, range_dict): 'start' : range_start, 'stop' : str(ip_address(e) -1) } + + if 'option' in range_dict: + r['option'] = range_dict['option'] + # On the next run our address range will start one address after # the exclude address range_start = str(ip_address(e) + 1) @@ -104,6 +108,10 @@ def dhcp_slice_range(exclude_list, range_dict): 'start': str(ip_address(e) + 1), 'stop': str(range_stop) } + + if 'option' in range_dict: + r['option'] = range_dict['option'] + if not (ip_address(r['start']) > ip_address(r['stop'])): output.append(r) else: |