added dn42 route collector as automatic peer

This commit is contained in:
Marcel - 2024-03-15 21:10:34 +01:00
parent 36654301a2
commit 08aa3e8fce
Signed by: m4rc3l
GPG Key ID: 446F3B093DF81C6A
2 changed files with 40 additions and 1 deletions

View File

@ -158,6 +158,46 @@ in
}
'')
cfg.peers))}
protocol bgp ROUTE_COLLECTOR from dnpeers {
neighbor fd42:4242:2601:ac12::1 as 4242422602;
source address ${cfg.addr.v6};
# enable multihop as the collector is not locally connected
multihop;
ipv4 {
# export all available paths to the collector
add paths tx;
# import/export filters
import none;
export filter {
# export all valid routes
if ( is_valid_network_v4() && source ~ [ RTS_STATIC, RTS_BGP ] )
then {
accept;
}
reject;
};
};
ipv6 {
# export all available paths to the collector
add paths tx;
# import/export filters
import none;
export filter {
# export all valid routes
if ( is_valid_network_v6() && source ~ [ RTS_STATIC, RTS_BGP ] )
then {
accept;
}
reject;
};
};
}
'';
};
};

View File

@ -116,4 +116,3 @@ function dn_export_collector() {
update_region();
accept;
}