summaryrefslogtreecommitdiff
path: root/src/conf_mode/policy-route.py
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-09-16 07:13:59 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2022-09-16 07:13:59 +0000
commit1b3ded9fb2846e20f3bec2a0e21dc4cec3a09139 (patch)
tree2fc0ea8d42a8f535d161df047c4870b76c6acc1a /src/conf_mode/policy-route.py
parent7a2ad35ec8ecd84d162a3e5dc41b50f31d18dc10 (diff)
downloadvyos-1x-1b3ded9fb2846e20f3bec2a0e21dc4cec3a09139.tar.gz
vyos-1x-1b3ded9fb2846e20f3bec2a0e21dc4cec3a09139.zip
policy-route: T4697: Add missing rule_id for verify_rule func
There is a missing 'rule_id' in verify_rule() function We call it from the loop but don't provide argument 'rule_id' It cause "NameError: name 'rule_id' is not defined" Fix it
Diffstat (limited to 'src/conf_mode/policy-route.py')
-rwxr-xr-xsrc/conf_mode/policy-route.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/policy-route.py b/src/conf_mode/policy-route.py
index 9fddbd2c6..00539b9c7 100755
--- a/src/conf_mode/policy-route.py
+++ b/src/conf_mode/policy-route.py
@@ -92,7 +92,7 @@ def get_config(config=None):
return policy
-def verify_rule(policy, name, rule_conf, ipv6):
+def verify_rule(policy, name, rule_conf, ipv6, rule_id):
icmp = 'icmp' if not ipv6 else 'icmpv6'
if icmp in rule_conf:
icmp_defined = False
@@ -166,7 +166,7 @@ def verify(policy):
for name, pol_conf in policy[route].items():
if 'rule' in pol_conf:
for rule_id, rule_conf in pol_conf['rule'].items():
- verify_rule(policy, name, rule_conf, ipv6)
+ verify_rule(policy, name, rule_conf, ipv6, rule_id)
for ifname, if_policy in policy['interfaces'].items():
name = dict_search_args(if_policy, 'route')