This commit is contained in:
2026-05-23 18:06:55 +08:00
parent 54089fa0bd
commit 11fce2a4a5
3 changed files with 15 additions and 32 deletions

View File

@@ -1,22 +1,9 @@
define DN42_PREFIXES_V4 = [
172.20.0.0/14+
];
define DN42_PREFIXES_V6 = [
fd00::/8+
];
function is_dn42_prefix() {
case net.type {
NET_IP4: return net ~ DN42_PREFIXES_V4;
NET_IP6: return net ~ DN42_PREFIXES_V6;
else: print "is_dn42_prefix: unexpected net.type ", net.type, " ", net; return false;
}
return net ~ [
172.20.0.0/14+
];
}
function is_dn42_self_net() {
case net.type {
NET_IP4: return net ~ is_dn42_self_IPv4;
NET_IP6: return net ~ is_dn42_self_IPv6;
else: print "is_dn42_prefix: unexpected net.type ", net.type, " ", net; return false;
}
return net ~ is_dn42_self_IPv4;
}

View File

@@ -20,6 +20,17 @@ template bgp dn42_up1_new {
ipv6 {import none;export none;};
}
template bgp dn42_ds {
graceful restart;
local as DN42_ASN;
ipv4 {
table dn42v4;
import filter {if !function_inet6_downstream_import() then reject; accept; };
export filter {if !function_inet6_downstream_export() then reject; accept; };
};
ipv6 {import none;export none;};
}
template bgp dn42_ibgp_new {
graceful restart;
local as DN42_ASN;
@@ -33,17 +44,4 @@ template bgp dn42_ibgp_new {
export filter {if !function_dn42_ibgp_export() then reject; accept; };
};
ipv6 {import none;export none;};
}
template bgp dn42_ibgp_mp_new {
graceful restart;
local as DN42_ASN;
med metric;
ipv4 {
table dn42v4;
import filter {if !function_dn42_ibgp_import() then reject; accept; };
export filter {if !function_dn42_ibgp_export() then reject; accept; };
};
ipv6 {import none;export none;};
}