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