Revert "对相关的配置进行修整;"

This reverts commit 1660565696.
This commit is contained in:
2025-10-13 02:39:09 +08:00
parent dd23abe233
commit 048b2567bf
11 changed files with 199 additions and 39 deletions

View File

@@ -1,7 +1,21 @@
function unet_is_valid_network_v4() {
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() {
return net ~ [
10.50.0.0/16+,
10.88.0.0/16+,
10.21.0.0/16+,
10.188.0.0/16+
];
@@ -14,15 +28,21 @@ function unet_is_valid_network_v4_anynet() {
];
}
function unet_is_valid_network_v4_allnet(){
if !unet_is_valid_network_v4_anynet() && !unet_is_valid_network_v4() then return false;
function unet_is_voalid_net_v4(){
if !unet_is_valid_network_v4_anynet() && !unet_is_valid_network_v4_unet() then return false;
return true;
}
function unet_is_voalid_net_v6(){
function unet_is_voalid_net_v6_anynet(){
return net ~ [
2406:840:e600::/44{44,56},
2a14:7580:9600::/40{40,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;
}

View File

@@ -2,6 +2,8 @@ ipv4 table inet4;
ipv6 table inet6;
ipv4 table unet4;
ipv6 table unet6;
ipv4 table dn42v4;
ipv6 table dn42v6;
ipv4 table ospf4;
ipv6 table ospf6;
@@ -25,6 +27,26 @@ protocol pipe inet6_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;
@@ -42,7 +64,7 @@ protocol pipe unet6_sync {
};
}
protocol pipe ospf4_sync {
protocol pipe pipe_ospf4_sync {
table ospf4;
peer table master4;
export filter {