diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-23 16:45:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-23 16:45:30 +0200 |
commit | de8d59284003bfe1b9d2327cfefc949f688cc486 (patch) | |
tree | d303f93ab6f260e58dbe43363de1c404f2184e24 /python/vyos/configverify.py | |
parent | 7711018aaebbefeb19e6e551f24ce08531970f7f (diff) | |
parent | c67d28c6cc897d83ec802e56e6e4807a67e65d31 (diff) | |
download | vyos-1x-de8d59284003bfe1b9d2327cfefc949f688cc486.tar.gz vyos-1x-de8d59284003bfe1b9d2327cfefc949f688cc486.zip |
Merge pull request #1298 from sever-sever/T4386
verify: T4386: Fix traffic-policy key in verify_mirror
Diffstat (limited to 'python/vyos/configverify.py')
-rw-r--r-- | python/vyos/configverify.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index 1062d51ee..438485d98 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -1,4 +1,4 @@ -# Copyright 2020-2021 VyOS maintainers and contributors <maintainers@vyos.io> +# Copyright 2020-2022 VyOS maintainers and contributors <maintainers@vyos.io> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -205,10 +205,10 @@ def verify_mirror_redirect(config): raise ConfigError(f'Requested redirect interface "{redirect_ifname}" '\ 'does not exist!') - if dict_search('traffic_policy.in', config) != None: + if ('mirror' in config or 'redirect' in config) and dict_search('traffic_policy.in', config) is not None: # XXX: support combination of limiting and redirect/mirror - this is an # artificial limitation - raise ConfigError('Can not use ingress policy tigether with mirror or redirect!') + raise ConfigError('Can not use ingress policy together with mirror or redirect!') def verify_authentication(config): """ |