对相关的配置进行修整;

This commit is contained in:
2025-10-03 21:47:58 +08:00
parent c454b5f16e
commit 1660565696
10 changed files with 30 additions and 198 deletions

View File

@@ -1,21 +1,7 @@
function dn42_is_valid_network() {
return net ~ [
172.20.0.0/14+,
10.100.0.0/14+,
172.31.0.0/16+,
10.127.0.0/16+
];
}
function dn42_is_valid_network_v6() {
return net ~ [
fd00::/8{32,64}
];
}
function unet_is_valid_network_v4_unet() {
function unet_is_valid_network_v4() {
return net ~ [
10.50.0.0/16+,
10.88.0.0/16+,
10.21.0.0/16+,
10.188.0.0/16+
];
@@ -28,21 +14,15 @@ function unet_is_valid_network_v4_anynet() {
];
}
function unet_is_voalid_net_v4(){
if !unet_is_valid_network_v4_anynet() && !unet_is_valid_network_v4_unet() then return false;
function unet_is_valid_network_v4_allnet(){
if !unet_is_valid_network_v4_anynet() && !unet_is_valid_network_v4() then return false;
return true;
}
function unet_is_voalid_net_v6_anynet(){
return net ~ [
2406:840:e600::/44{44,56},
2a14:7580:9600::/40{45,56},
fde8:936e:ee29::/48{48,56}
];
}
function unet_is_voalid_net_v6(){
if !unet_is_voalid_net_v6_anynet() then return false;
return true;
return net ~ [
2406:840:e600::/44{44,56},
2a14:7580:9600::/40{40,56}
];
}

View File

@@ -2,8 +2,6 @@ ipv4 table inet4;
ipv6 table inet6;
ipv4 table unet4;
ipv6 table unet6;
ipv4 table dn42v4;
ipv6 table dn42v6;
ipv4 table ospf4;
ipv6 table ospf6;
@@ -27,26 +25,6 @@ protocol pipe inet4_sync {
};
}
protocol pipe dn42v4_sync {
table dn42v4;
peer table master4;
import none;
export filter {
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
accept;
};
}
protocol pipe dn42v6_sync {
table dn42v6;
peer table master6;
import none;
export filter {
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
accept;
};
}
protocol pipe unet4_sync {
table unet4;
peer table master4;
@@ -64,7 +42,7 @@ protocol pipe unet6_sync {
};
}
protocol pipe pipe_ospf4_sync {
protocol pipe ospf4_sync {
table ospf4;
peer table master4;
export filter {