12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- # Gitoyen <contact@gitoyen.net>
- #
- # vim: set ts=4:sw=4
- protocol direct {
- interface "lagg0.*";
- }
- protocol device {
- scan time 5;
- }
- # Filters for the kernerl procotol allowing to handle the blackhole
- filter import_kernel {
- if dest = RTD_BLACKHOLE && is_within_gitoyen() then {
- bgp_community.add ((20766,9999));
- accept;
- }
- if is_within_carp() then {
- reject;
- }
- accept;
- }
- filter export_kernel {
- if filter( bgp_community, [ (20766,9999) ]).len >0 then {
- dest = RTD_BLACKHOLE;
- accept;
- }
- if is_within_carp() then {
- reject;
- }
- accept;
- }
- # Import/export of the routes from/to the kernel
- protocol kernel {
- learn;
- scan time 60;
- import filter import_kernel;
- export filter export_kernel;
- persist;
- #device routes;
- }
|