This commit is contained in:
2026-05-23 16:48:17 +08:00
parent 9ee29d8cb7
commit e5e0b96c7d
3 changed files with 12 additions and 25 deletions

View File

@@ -1,12 +1,12 @@
protocol pipe dn42v4_sync {
table dn42v4;
peer table master4;
peer table t102v4;
export filter {
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
if !is_dn42_prefix() then reject;
bgp_community.empty;
bgp_large_community.empty;
bgp_large_community.add((UNET_ASN,10,4));
bgp_large_community.add((UNET_ASN,10,10204));
krt_prefsrc = DN42_V4_kernel;
accept;
};
@@ -15,13 +15,13 @@ protocol pipe dn42v4_sync {
protocol pipe dn42v6_sync {
table dn42v6;
peer table master6;
peer table t102v6;
export filter {
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
if !is_dn42_prefix() then reject;
bgp_community.empty;
bgp_large_community.empty;
bgp_large_community.add((UNET_ASN,10,6));
bgp_large_community.add((UNET_ASN,10,10206));
krt_prefsrc = DN42_V6_kernel;
accept;
};

View File

@@ -4,7 +4,9 @@ protocol pipe unet4_inet4_sync {
peer table inet4;
export filter {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
if is_bogon_prefix() then reject;
if is_bogon_prefix() then {
if net!~[10.188.0.0/16+] then reject;
};
accept;
};
import none;
@@ -28,7 +30,9 @@ protocol pipe unet4_dn42v4_sync {
peer table dn42v4;
export filter {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
if !is_dn42_prefix() then reject;
if !is_dn42_prefix() then {
if net!~[10.188.0.0/16+] then reject;
};
accept;
};
import none;
@@ -60,15 +64,4 @@ protocol pipe unet4_sync {
accept;
};
import none;
}
protocol pipe unet4_syncto_inet4 {
table unet4;
peer table inet4;
export filter {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
if net!~[10.188.0.0/16+] then reject;
accept;
};
import none;
}