diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-01-31 19:26:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-31 19:26:37 +0100 |
commit | 36e54482a242e785c7a052035549bb45a117ea9a (patch) | |
tree | 3d947addcb9ea4c375e2771eed68e393e9295cbe /src/conf_mode/policy-route.py | |
parent | 3aa1ec3f03a95ad41d3476b92b8b31a68b516b14 (diff) | |
parent | ff2cc45f8ba6d7ad1bc75ef384643692a54f31cc (diff) | |
download | vyos-1x-36e54482a242e785c7a052035549bb45a117ea9a.tar.gz vyos-1x-36e54482a242e785c7a052035549bb45a117ea9a.zip |
Merge pull request #1199 from sarthurdev/T4218
firewall: T4218: T4216: Add prefix to user defined chains, support negated groups, fixes
Diffstat (limited to 'src/conf_mode/policy-route.py')
-rwxr-xr-x | src/conf_mode/policy-route.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/policy-route.py b/src/conf_mode/policy-route.py index 7dcab4b58..82f668acf 100755 --- a/src/conf_mode/policy-route.py +++ b/src/conf_mode/policy-route.py @@ -206,6 +206,7 @@ def apply_table_marks(policy): for route in ['route', 'route6']: if route in policy: cmd_str = 'ip' if route == 'route' else 'ip -6' + tables = [] for name, pol_conf in policy[route].items(): if 'rule' in pol_conf: for rule_id, rule_conf in pol_conf['rule'].items(): @@ -213,6 +214,9 @@ def apply_table_marks(policy): if set_table: if set_table == 'main': set_table = '254' + if set_table in tables: + continue + tables.append(set_table) table_mark = mark_offset - int(set_table) cmd(f'{cmd_str} rule add pref {set_table} fwmark {table_mark} table {set_table}') |