summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-03-03 20:23:09 +0100
committerChristian Poessinger <christian@poessinger.com>2022-03-03 20:23:09 +0100
commitbb78f3a9ad28f62896a536719783011794deb64c (patch)
tree8dfe129772c4ce94744f24c984e720bf94c98b6f /src
parente3f86ce0d65fe8fe0c5eebebdfd3ab3723e2e539 (diff)
downloadvyos-1x-bb78f3a9ad28f62896a536719783011794deb64c.tar.gz
vyos-1x-bb78f3a9ad28f62896a536719783011794deb64c.zip
static: T4283: support "reject" routes - emit an ICMP unreachable when matched
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_static.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_static.py b/src/conf_mode/protocols_static.py
index c1e427b16..f0ec48de4 100755
--- a/src/conf_mode/protocols_static.py
+++ b/src/conf_mode/protocols_static.py
@@ -82,6 +82,10 @@ def verify(static):
for interface, interface_config in prefix_options[type].items():
verify_vrf(interface_config)
+ if {'blackhole', 'reject'} <= set(prefix_options):
+ raise ConfigError(f'Can not use both blackhole and reject for '\
+ 'prefix "{prefix}"!')
+
return None
def generate(static):