summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@poessinger.com>2023-01-05 07:18:30 +0100
committerGitHub <noreply@github.com>2023-01-05 07:18:30 +0100
commit542d9498e494ed74c23568962a192357ac47c084 (patch)
tree2a559e9de9b38c6a91214205caca7129d440fa13 /src
parentd1ef90e1eb51334b99ad716969e17c7f257e1a39 (diff)
parentdafb0da26d9c27e2a2e836fc56175af5da039479 (diff)
downloadvyos-1x-542d9498e494ed74c23568962a192357ac47c084.tar.gz
vyos-1x-542d9498e494ed74c23568962a192357ac47c084.zip
Merge pull request #1710 from dmbaturin/routing-table-descriptions
T4883: add a description field for routing tables
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_static.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_static.py b/src/conf_mode/protocols_static.py
index 58e202928..cbbc476a7 100755
--- a/src/conf_mode/protocols_static.py
+++ b/src/conf_mode/protocols_static.py
@@ -98,6 +98,15 @@ def generate(static):
return None
def apply(static):
+ ## Put routing table names in /etc/iproute2/rt_tables
+ with open("/etc/iproute2/rt_tables.d/vyos.conf", 'w') as f:
+ print("# Generated by VyOS (protocols_static.py), do not edit by hand", file=f)
+ for t in static['table']:
+ if 'description' in static['table'][t]:
+ print(f"{t}\t{static['table'][t]['description']}", file=f)
+
+ ## Inject routes into FRR
+
static_daemon = 'staticd'
zebra_daemon = 'zebra'