diff options
author | Christian Breunig <christian@breunig.cc> | 2023-07-03 20:58:59 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-07-03 21:03:01 +0200 |
commit | fbb4f315eee8cd701aade8845ea842567a56dc64 (patch) | |
tree | b2af92ee0563fd94fd151d13c061a358398cdc99 /src/conf_mode | |
parent | 79c8ca40a340743131b6bb34e44305331de4969b (diff) | |
download | vyos-1x-fbb4f315eee8cd701aade8845ea842567a56dc64.tar.gz vyos-1x-fbb4f315eee8cd701aade8845ea842567a56dc64.zip |
ospf: T5334: add support for external route summarisation Type-5 and Type-7 LSAs
* set protocols ospf aggregation timer <seconds>
* set protocols ospf summary-address x.x.x.x/x [tag 1-4294967295]
* set protocols ospf summary-address x.x.x.x/x no-advertise
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/protocols_ospf.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py index b73483470..460c9f1a4 100755 --- a/src/conf_mode/protocols_ospf.py +++ b/src/conf_mode/protocols_ospf.py @@ -250,6 +250,13 @@ 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 route summarisation + if 'summary_address' in ospf: + for prefix, prefix_options in ospf['summary_address'].items(): + if {'tag', 'no_advertise'} <= set(prefix_options): + raise ConfigError(f'Can not set both "tag" and "no-advertise" for Type-5 '\ + f'and Type-7 route summarisation of "{prefix}"!') + return None def generate(ospf): |