filter6.txt 1.2 KB

1234567891011121314151617181920
  1. # To Quagga Rules:
  2. # cat filter6.txt | \
  3. # grep -e ^[0-9] | \
  4. # awk '{ print "ipv prefix-list dn42v6-in seq " $1 " " $2 " " $3 " ge " $4 " le " $5}' | \
  5. # sed "s_/\([0-9]\+\) ge \1_/\1_g;s_/\([0-9]\+\) le \1_/\1_g"
  6. #
  7. # For BIRD Rules: (see also: utils/bgp-filter.rb)
  8. # cat filter6.txt | \
  9. # awk 'BEGIN {printf "function is_valid_network() {\n return net ~ [\n" } \
  10. # /^[0-9]/ && $2 ~ /permit/ {printf " %s{%s,%s},\n", $3, $4, $5};' | \
  11. # sed "$ s/,$/\n ];\n}/"
  12. # The rules MUST be sorted by the number column first and then the first matching rule MUST be used. # ROAs MUST be checked against these rules and max-length of the ROA NUST NOT be longer than allowed by the matching rule.
  13. # Nr Action Prefix MinLen MaxLen # Comment
  14. 1001 permit fd00::/8 44 64 # ULA (defined)
  15. 9999 deny ::/0 0 128 # block the rest