diff options
author | Christian Breunig <christian@breunig.cc> | 2023-07-14 20:48:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 20:48:05 +0200 |
commit | 36ce4167538db89c9c3a822de1218faf7397c9bd (patch) | |
tree | 0d20a5c1ee7f590e8d98cb5d80abd43fe10da0f8 /src/conf_mode/dhcp_relay.py | |
parent | 0a248d50560772d84e32fe696b569087bd8586d4 (diff) | |
parent | 63f75ddbd948852f911239d672021bd5473bb16d (diff) | |
download | vyos-1x-36ce4167538db89c9c3a822de1218faf7397c9bd.tar.gz vyos-1x-36ce4167538db89c9c3a822de1218faf7397c9bd.zip |
Merge pull request #2089 from nicolas-fort/T5059
T5059: relay: add disable options for dhcp-relay and dhcpv6-relay
Diffstat (limited to 'src/conf_mode/dhcp_relay.py')
-rwxr-xr-x | src/conf_mode/dhcp_relay.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/dhcp_relay.py b/src/conf_mode/dhcp_relay.py index 7e702a446..7322cc571 100755 --- a/src/conf_mode/dhcp_relay.py +++ b/src/conf_mode/dhcp_relay.py @@ -51,7 +51,7 @@ def get_config(config=None): def verify(relay): # bail out early - looks like removal from running config - if not relay: + if not relay or 'disable' in relay: return None if 'lo' in (dict_search('interface', relay) or []): @@ -78,7 +78,7 @@ def verify(relay): def generate(relay): # bail out early - looks like removal from running config - if not relay: + if not relay or 'disable' in relay: return None render(config_file, 'dhcp-relay/dhcrelay.conf.j2', relay) @@ -87,7 +87,7 @@ def generate(relay): def apply(relay): # bail out early - looks like removal from running config service_name = 'isc-dhcp-relay.service' - if not relay: + if not relay or 'disable' in relay: call(f'systemctl stop {service_name}') if os.path.exists(config_file): os.unlink(config_file) |