From 3a6b014333cd2500d0ff47213fb2c46f9696d204 Mon Sep 17 00:00:00 2001 From: gaoyuheng Date: Wed, 17 Dec 2025 18:13:41 +0800 Subject: [PATCH] 0 --- bird/net/inet.conf | 27 ++++++++++----------------- bird/net/unet.conf | 4 ++-- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/bird/net/inet.conf b/bird/net/inet.conf index 993723c..0f74054 100644 --- a/bird/net/inet.conf +++ b/bird/net/inet.conf @@ -1,4 +1,4 @@ -protocol kernel { +protocol kernel kernel_inet4_102 { scan time 20; kernel table 102; ipv4 { @@ -6,6 +6,7 @@ protocol kernel { import none; export filter { if source = RTS_STATIC then reject; + if bgp_large_community ~ [(LOCAL_ASN, 3,*)] then reject; if !is_bogon_prefix() then { krt_prefsrc = LOCAL_V4_kernel; accept; @@ -15,20 +16,12 @@ protocol kernel { }; }; - -protocol kernel { - scan time 20; - kernel table 102; - ipv6 { - table inet6; - import none; - export filter { - if source = RTS_STATIC then reject; - if !is_bogon_prefix() then { - krt_prefsrc = LOCAL_V6_kernel; - accept; - } - reject; - }; +protocol pipe inet6_sync_to_master6 { + table inet6; + peer table master6; + export filter { + if bgp_large_community ~ [(LOCAL_ASN, 3,*)] then reject; + accept; }; -}; \ No newline at end of file + import none; +} \ No newline at end of file diff --git a/bird/net/unet.conf b/bird/net/unet.conf index e3c73bc..547114d 100644 --- a/bird/net/unet.conf +++ b/bird/net/unet.conf @@ -1,4 +1,4 @@ -# 公网处理 +# 公网处理 => inet4/6 protocol pipe unet4_inet4_sync { table unet4; peer table master4; @@ -24,7 +24,7 @@ protocol pipe unet6_inet6_sync { } -# DN42处理 +# DN42处理 => dn42v4/6 protocol pipe unet4_dn42v4_sync { table unet4; peer table dn42v4;