bird: prevent duplicate rules

This commit is contained in:
jeltz 2022-09-04 07:40:51 +02:00
parent 61cdb980ea
commit b0e12b19f8
Signed by: jeltz
GPG key ID: 800882B66C0C3326

View file

@ -8,25 +8,30 @@ protocol device {
scan time 10; scan time 10;
} }
protocol kernel { protocol direct {
ipv4;
ipv6;
}
protocol kernel kernel4 {
ipv4 { ipv4 {
import all; import all;
export all; export where source != RTS_DEVICE;
}; };
} }
protocol kernel { protocol kernel kernel6 {
ipv6 { ipv6 {
import all; import all;
export all; export where source != RTS_DEVICE;
}; };
} }
protocol ospf v2 { protocol ospf v2 ospf4 {
ipv4 { ipv4 {
import all; import all;
export where source = RTS_STATIC; export where source ~ [ RTS_STATIC, RTS_DEVICE ];
}; };
area 0 { area 0 {
@ -50,11 +55,11 @@ protocol ospf v2 {
} }
protocol ospf v3 { protocol ospf v3 ospf6 {
ipv6 { ipv6 {
import all; import all;
export where source = RTS_STATIC; export where source ~ [ RTS_STATIC, RTS_DEVICE ];
}; };
area 0 { area 0 {
@ -81,10 +86,6 @@ protocol ospf v3 {
{% if bird__radv_interfaces %} {% if bird__radv_interfaces %}
protocol radv { protocol radv {
ipv6 {
export all;
};
{% for name, iface in bird__radv_interfaces.items() %} {% for name, iface in bird__radv_interfaces.items() %}
interface {{ name | enquote }} { interface {{ name | enquote }} {
max ra interval {{ bird__radv_max_interval | int }}; max ra interval {{ bird__radv_max_interval | int }};