diff options
author | Christian Breunig <christian@breunig.cc> | 2024-03-02 08:40:23 +0100 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-03-02 10:01:08 +0000 |
commit | 1ddb50159209cbfbff49b8bd4a9f81557bf08116 (patch) | |
tree | 84b67552e892157b56d1e29534b3202b9c8bc481 /src/conf_mode/protocols_ospf.py | |
parent | b798603e21faad8b6cf4d78a2900ea54703fecef (diff) | |
download | vyos-1x-1ddb50159209cbfbff49b8bd4a9f81557bf08116.tar.gz vyos-1x-1ddb50159209cbfbff49b8bd4a9f81557bf08116.zip |
ospf: T5717: sync code with ospfv3 implementation
(cherry picked from commit 298bcc5cb90c4c83981ec4baaaa0db785306867d)
Diffstat (limited to 'src/conf_mode/protocols_ospf.py')
-rwxr-xr-x | src/conf_mode/protocols_ospf.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py index 198d78ee0..93fc4dba6 100755 --- a/src/conf_mode/protocols_ospf.py +++ b/src/conf_mode/protocols_ospf.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2021-2023 VyOS maintainers and contributors +# Copyright (C) 2021-2024 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -93,6 +93,8 @@ def get_config(config=None): for protocol in ['babel', 'bgp', 'connected', 'isis', 'kernel', 'rip', 'static']: if dict_search(f'redistribute.{protocol}', ospf) is None: del default_values['redistribute'][protocol] + if not bool(default_values['redistribute']): + del default_values['redistribute'] for interface in ospf.get('interface', []): # We need to reload the defaults on every pass b/c of @@ -215,7 +217,7 @@ def verify(ospf): raise ConfigError(f'Segment routing prefix {prefix} cannot have both explicit-null '\ f'and no-php-flag configured at the same time.') - # Check for index ranges being larger than the segment routing global block + # Check for index ranges being larger than the segment routing global block if dict_search('segment_routing.global_block', ospf): g_high_label_value = dict_search('segment_routing.global_block.high_label_value', ospf) g_low_label_value = dict_search('segment_routing.global_block.low_label_value', ospf) |