Fix: finally working now
parent
ef9c4e765d
commit
4074719c8c
|
@ -0,0 +1 @@
|
|||
# Yes, It's just a blank file.
|
|
@ -1,3 +1,5 @@
|
|||
router id 10.0.0.101;
|
||||
|
||||
define LOCAL_ASN = 200536;
|
||||
|
||||
define DOWNSTREAM_ASN = [ 140506, 200536 ];
|
||||
|
@ -7,3 +9,5 @@ define POP = 101;
|
|||
define REGION = 100;
|
||||
|
||||
define SELFASN = 4200000101;
|
||||
|
||||
define ROUTER_IP = 2a0a:6040:a901::1;
|
|
@ -82,10 +82,10 @@ function transit_import_filter(int ASN) {
|
|||
}
|
||||
|
||||
function transit_export_filter(int ASN) {
|
||||
if !is_valid() then return false;
|
||||
# Delete Self eBGP Confed Path.
|
||||
bgp_path.delete([4200000000..4225479999]);
|
||||
if !is_valid() then return false;
|
||||
pub_process_communities(ASN, 10);
|
||||
if bgp_path.last !~ DOWNSTREAM_ASN then return false;
|
||||
if bgp_path.last !~ DOWNSTREAM_ASN && source = RTS_BGP then return false;
|
||||
return true;
|
||||
}
|
|
@ -16,9 +16,9 @@ function direct_peer_import_filter(int ASN) {
|
|||
}
|
||||
|
||||
function direct_peer_export_filter(int ASN) {
|
||||
bgp_path.delete([4200000000..4225479999]);
|
||||
if !is_valid() then return false;
|
||||
# Delete Self eBGP Confed Path.
|
||||
bgp_path.delete([4200000000..4225479999]);
|
||||
pub_process_communities(ASN, 10);
|
||||
if !is_peer_route() then return false;
|
||||
return true;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
template bgp pub_transit {
|
||||
local as LOCAL_ASN;
|
||||
|
||||
ipv6 {
|
||||
import where transit_import_filter(6939);
|
||||
export where transit_export_filter(6939);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
protocol device {
|
||||
scan time 5;
|
||||
scan time 10;
|
||||
}
|
||||
|
||||
protocol kernel {
|
||||
|
|
|
@ -28,6 +28,6 @@ function is_valid() {
|
|||
if pub_is_invalid_net_length() then return false;
|
||||
if is_bogon_prefix() then return false;
|
||||
if is_bogon_asn() then return false;
|
||||
if is_rpki_invalid() then return false;
|
||||
if is_rpki_invalid() && source = RTS_BGP then return false;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue