kernel.conf 847 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Gitoyen <contact@gitoyen.net>
  2. #
  3. # vim: set ts=4:sw=4
  4. protocol direct {
  5. interface "lagg0.*";
  6. }
  7. protocol device {
  8. scan time 5;
  9. }
  10. # Filters for the kernerl procotol allowing to handle the blackhole
  11. filter import_kernel {
  12. if dest = RTD_BLACKHOLE && is_within_gitoyen() then {
  13. bgp_community.add ((20766,9999));
  14. accept;
  15. }
  16. if is_within_carp() then {
  17. reject;
  18. }
  19. accept;
  20. }
  21. filter export_kernel {
  22. if filter( bgp_community, [ (20766,9999) ]).len >0 then {
  23. dest = RTD_BLACKHOLE;
  24. accept;
  25. }
  26. if is_within_carp() then {
  27. reject;
  28. }
  29. accept;
  30. }
  31. # Import/export of the routes from/to the kernel
  32. protocol kernel {
  33. learn;
  34. scan time 60;
  35. import filter import_kernel;
  36. export filter export_kernel;
  37. persist;
  38. #device routes;
  39. }