diff options
author | Christian Breunig <christian@breunig.cc> | 2024-03-02 11:00:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 11:00:12 +0100 |
commit | 70cf2388a184eacc6fb52d9edfb1c930de3bbb6a (patch) | |
tree | b6f57e021e95e3dd7cc1912498ce11cdac5e0909 /src/conf_mode/protocols_ospfv3.py | |
parent | ce25bc49dd6b28fb80c85ec2dbe37c8ac6c11217 (diff) | |
parent | 298bcc5cb90c4c83981ec4baaaa0db785306867d (diff) | |
download | vyos-1x-70cf2388a184eacc6fb52d9edfb1c930de3bbb6a.tar.gz vyos-1x-70cf2388a184eacc6fb52d9edfb1c930de3bbb6a.zip |
Merge pull request #3073 from c-po/ospfv3-redistribution-T5717
ospfv3: allow metric and metric-type on redistributed routes
Diffstat (limited to 'src/conf_mode/protocols_ospfv3.py')
-rwxr-xr-x | src/conf_mode/protocols_ospfv3.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_ospfv3.py b/src/conf_mode/protocols_ospfv3.py index 5b1adce30..2c1cbfecd 100755 --- a/src/conf_mode/protocols_ospfv3.py +++ b/src/conf_mode/protocols_ospfv3.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 @@ -85,6 +85,12 @@ def get_config(config=None): if 'graceful_restart' not in ospfv3: del default_values['graceful_restart'] + for protocol in ['babel', 'bgp', 'connected', 'kernel', 'ripng', 'static']: + if dict_search(f'redistribute.{protocol}', ospfv3) is None: + del default_values['redistribute'][protocol] + if not bool(default_values['redistribute']): + del default_values['redistribute'] + default_values.pop('interface', {}) # merge in remaining default values |