diff options
author | Roman Khramshin <HollyGurza@users.noreply.github.com> | 2024-11-21 13:41:10 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-21 09:41:10 +0200 |
commit | b51cf400b42d7b2d05237169a813d1e952213558 (patch) | |
tree | 12fe95038495b36d7d008400ae0b039430b051e4 /src | |
parent | 1a291b44716ae268916a95971016fb0cf9584ba0 (diff) | |
download | vyos-1x-b51cf400b42d7b2d05237169a813d1e952213558.tar.gz vyos-1x-b51cf400b42d7b2d05237169a813d1e952213558.zip |
T6796: QoS: match filter by interface(iif) (#4188)
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/qos.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/conf_mode/qos.py b/src/conf_mode/qos.py index a4d5f44e7..0019873d9 100755 --- a/src/conf_mode/qos.py +++ b/src/conf_mode/qos.py @@ -198,10 +198,16 @@ def get_config(config=None): def _verify_match(cls_config: dict) -> None: if 'match' in cls_config: for match, match_config in cls_config['match'].items(): - if {'ip', 'ipv6'} <= set(match_config): + filters = set(match_config) + if {'ip', 'ipv6'} <= filters: raise ConfigError( f'Can not use both IPv6 and IPv4 in one match ({match})!') + if {'interface', 'vif'} & filters: + if {'ip', 'ipv6', 'ether'} & filters: + raise ConfigError( + f'Can not combine protocol and interface or vlan tag match ({match})!') + def _verify_match_group_exist(cls_config, qos): if 'match_group' in cls_config: |