summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorViacheslav <v.gletenko@vyos.io>2021-08-15 14:11:41 +0000
committerHenning Surmeier <me@hensur.de>2022-02-23 22:08:01 +0100
commit1430045d6ddf88454b29e8f05032a1c1aab605a0 (patch)
tree951862b521e21430ec83a5042f90d9292f56a6d8 /src
parent8f9c222de6ed33f76198d4bbecfb8012021f5582 (diff)
downloadvyos-1x-1430045d6ddf88454b29e8f05032a1c1aab605a0.tar.gz
vyos-1x-1430045d6ddf88454b29e8f05032a1c1aab605a0.zip
pbr: T3702: Fix incorrect splits for fwmark
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/policy-local-route.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf_mode/policy-local-route.py b/src/conf_mode/policy-local-route.py
index 0b7ceedeb..539189442 100755
--- a/src/conf_mode/policy-local-route.py
+++ b/src/conf_mode/policy-local-route.py
@@ -114,15 +114,15 @@ def apply(pbr):
# Only fwmark in the rule
# set policy local-route rule 101 fwmark '23'
if 'fwmark' in pbr['rule'][rule] and not 'source' in pbr['rule'][rule]:
- for fwmk in pbr['rule'][rule]['fwmark']:
- call(f'ip rule add prio {rule} from all fwmark {fwmk} lookup {table}')
+ fwmk = pbr['rule'][rule]['fwmark']
+ call(f'ip rule add prio {rule} from all fwmark {fwmk} lookup {table}')
# Source and fwmark in the rule
# set policy local-route rule 100 source '203.0.113.1'
# set policy local-route rule 100 fwmark '23'
if 'source' in pbr['rule'][rule] and 'fwmark' in pbr['rule'][rule]:
+ fwmk = pbr['rule'][rule]['fwmark']
for src in pbr['rule'][rule]['source']:
- for fwmk in pbr['rule'][rule]['fwmark']:
- call(f'ip rule add prio {rule} from {src} fwmark {fwmk} lookup {table}')
+ call(f'ip rule add prio {rule} from {src} fwmark {fwmk} lookup {table}')
return None