diff options
author | Georg <georg@lysergic.dev> | 2022-04-08 14:52:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-08 14:52:37 +0000 |
commit | 630945291c9a389ad62fd32caea3749f4c5e9d72 (patch) | |
tree | a85f72880269bfb43740b7a0bc790dcaca6de1e7 /src/op_mode/policy_route.py | |
parent | 15461be0cd7b51e0e290d66bae0bb112f6b2c3ea (diff) | |
parent | 654dbc9aa3b0d27ec4f3faefff6cbd85fc3e1d1a (diff) | |
download | vyos-1x-630945291c9a389ad62fd32caea3749f4c5e9d72.tar.gz vyos-1x-630945291c9a389ad62fd32caea3749f4c5e9d72.zip |
Merge branch 'current' into dhcpd
Diffstat (limited to 'src/op_mode/policy_route.py')
-rwxr-xr-x | src/op_mode/policy_route.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/op_mode/policy_route.py b/src/op_mode/policy_route.py index e0b4ac514..5be40082f 100755 --- a/src/op_mode/policy_route.py +++ b/src/op_mode/policy_route.py @@ -26,7 +26,7 @@ def get_policy_interfaces(conf, policy, name=None, ipv6=False): interfaces = conf.get_config_dict(['interfaces'], key_mangling=('-', '_'), get_first_key=True, no_tag_node_value_mangle=True) - routes = ['route', 'ipv6_route'] + routes = ['route', 'route6'] def parse_if(ifname, if_conf): if 'policy' in if_conf: @@ -52,7 +52,7 @@ def get_policy_interfaces(conf, policy, name=None, ipv6=False): def get_config_policy(conf, name=None, ipv6=False, interfaces=True): config_path = ['policy'] if name: - config_path += ['ipv6-route' if ipv6 else 'route', name] + config_path += ['route6' if ipv6 else 'route', name] policy = conf.get_config_dict(config_path, key_mangling=('-', '_'), get_first_key=True, no_tag_node_value_mangle=True) @@ -64,8 +64,8 @@ def get_config_policy(conf, name=None, ipv6=False, interfaces=True): for route_name, route_conf in policy['route'].items(): route_conf['interface'] = [] - if 'ipv6_route' in policy: - for route_name, route_conf in policy['ipv6_route'].items(): + if 'route6' in policy: + for route_name, route_conf in policy['route6'].items(): route_conf['interface'] = [] get_policy_interfaces(conf, policy, name, ipv6) @@ -151,8 +151,8 @@ def show_policy(ipv6=False): for route, route_conf in policy['route'].items(): output_policy_route(route, route_conf, ipv6=False) - if ipv6 and 'ipv6_route' in policy: - for route, route_conf in policy['ipv6_route'].items(): + if ipv6 and 'route6' in policy: + for route, route_conf in policy['route6'].items(): output_policy_route(route, route_conf, ipv6=True) def show_policy_name(name, ipv6=False): |