kernel.conf 981 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. # en: Filters for the kernerl procotol allowing to handle the blackhole
  11. # fr: Filtres pour le protocole kernel permettant la gestion du blackhole
  12. filter import_kernel {
  13. if dest = RTD_BLACKHOLE && is_within_gitoyen() then {
  14. bgp_community.add ((20766,9999));
  15. accept;
  16. }
  17. if is_within_carp() then {
  18. reject;
  19. }
  20. accept;
  21. }
  22. filter export_kernel {
  23. if filter( bgp_community, [ (20766,9999) ]).len >0 then {
  24. dest = RTD_BLACKHOLE;
  25. accept;
  26. }
  27. if is_within_carp() then {
  28. reject;
  29. }
  30. accept;
  31. }
  32. # en: Import/export of the routes from/to the kernel
  33. # fr: Import/export des routes depuis/vers le noyau
  34. protocol kernel {
  35. learn;
  36. scan time 60;
  37. import filter import_kernel;
  38. export filter export_kernel;
  39. persist;
  40. #device routes;
  41. }