[bird] Don't export some routes if we announce a /24 that we can route

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
certbot_on_virtu
Yohann D'ANELLO 2021-07-26 22:36:41 +02:00
parent 6a66ccd8ca
commit 5ade6fe486
Signed by: _ynerant
GPG Key ID: 3A75C55819C8CF85
5 changed files with 20 additions and 0 deletions

View File

@ -8,6 +8,8 @@ loc_bird:
statics: statics:
- 185.230.78.0/24 - 185.230.78.0/24
- 185.230.79.0/24 - 185.230.79.0/24
kernel_filter:
- 185.230.78.0/24
bgps: bgps:
- name: viarezo - name: viarezo
allow_local_as: 1 allow_local_as: 1

View File

@ -8,6 +8,8 @@ loc_bird:
statics: statics:
- 185.230.78.0/24 - 185.230.78.0/24
- 185.230.79.0/24 - 185.230.79.0/24
kernel_filter:
- 185.230.78.0/24
bgps: bgps:
- name: viarezo - name: viarezo
allow_local_as: 1 allow_local_as: 1

View File

@ -8,6 +8,8 @@ loc_bird:
statics: statics:
- 185.230.78.0/24 - 185.230.78.0/24
- 185.230.79.0/24 - 185.230.79.0/24
kernel_filter:
- 185.230.78.0/24
bgps: bgps:
- name: viarezo - name: viarezo
allow_local_as: 1 allow_local_as: 1

View File

@ -23,7 +23,14 @@ protocol kernel {
# persist; # persist;
scan time 60; scan time 60;
import none; import none;
{% if bird.ipv4.kernel_filter is defined %}
export filter {
if ( net ~ [ {{ bird.ipv4.kernel_filter|join(', ') }} ] ) then reject;
accept;
};
{% else %}
export all; export all;
{% endif %}
} }
# The Device protocol is not a real routing protocol. It doesn't generate any # The Device protocol is not a real routing protocol. It doesn't generate any

View File

@ -22,7 +22,14 @@ protocol kernel {
# persist; # persist;
scan time 60; scan time 60;
import none; import none;
{% if bird.ipv6.kernel_filter is defined %}
export filter {
if ( net ~ [ {{ bird.ipv6.kernel_filter|join(', ') }} ] ) then reject;
accept;
};
{% else %}
export all; export all;
{% endif %}
} }
# The Device protocol is not a real routing protocol. It doesn't generate any # The Device protocol is not a real routing protocol. It doesn't generate any