summaryrefslogtreecommitdiff
path: root/roles/uvok_bird/templates
diff options
context:
space:
mode:
authoruvok cheetah2024-04-19 19:47:35 +0200
committeruvok cheetah2024-04-19 19:47:35 +0200
commit293ddf3a4bf78d72fea4b8196e3bbc2d81b3f12e (patch)
treea96f32bd5a4a86397fb8f671cb1674fc989b15fa /roles/uvok_bird/templates
parent429d80ecffbeaa788af477eaa8a328c284c8aeed (diff)
bird: Add rule to prefer direct neighbor
Diffstat (limited to 'roles/uvok_bird/templates')
-rw-r--r--roles/uvok_bird/templates/clearnet.conf.j28
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/uvok_bird/templates/clearnet.conf.j2 b/roles/uvok_bird/templates/clearnet.conf.j2
index 9f75798..420a8da 100644
--- a/roles/uvok_bird/templates/clearnet.conf.j2
+++ b/roles/uvok_bird/templates/clearnet.conf.j2
@@ -108,6 +108,13 @@ function reject_roa_rpki()
}
}
+function prefer_direct_neighbor()
+{
+ if (bgp_path.len = 1) then
+ bgp_local_pref = bgp_local_pref + 700;
+}
+
+
function clearnet_common_import() {
reject_bogon_asns();
reject_bogon_prefixes();
@@ -115,6 +122,7 @@ function clearnet_common_import() {
reject_small_prefixes();
reject_problem_prefixes();
reject_roa_rpki();
+ prefer_direct_neighbor();
honor_graceful_shutdown();
}