From 618cad720ab144b53836df191815a44ec5a4d747 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Wed, 21 Dec 2022 16:51:43 +0100 Subject: [PATCH] bird: add OSPF stubnet support --- roles/bird/defaults/main.yml | 1 + roles/bird/templates/bird.conf.j2 | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/roles/bird/defaults/main.yml b/roles/bird/defaults/main.yml index 2fa912c..68e90f2 100644 --- a/roles/bird/defaults/main.yml +++ b/roles/bird/defaults/main.yml @@ -1,5 +1,6 @@ --- bird__ospf_stub_interfaces: [] +bird__ospf_stub_networks: [] bird__ospf_broadcast_interfaces: {} bird__ospf_hello: 2 bird__ospf_retransmit: 5 diff --git a/roles/bird/templates/bird.conf.j2 b/roles/bird/templates/bird.conf.j2 index bcb13c6..94a8cf5 100644 --- a/roles/bird/templates/bird.conf.j2 +++ b/roles/bird/templates/bird.conf.j2 @@ -58,6 +58,9 @@ protocol ospf v2 ospf4 { }; area 0 { +{% for network in bird__ospf_stub_networks | ansible.utils.ipv4 %} + stubnet {{ network }}; +{% endfor %} {% for name, iface in bird__ospf_broadcast_interfaces.items() %} interface {{ name | enquote }} { type broadcast; @@ -86,6 +89,9 @@ protocol ospf v3 ospf6 { }; area 0 { +{% for network in bird__ospf_stub_networks | ansible.utils.ipv6 %} + stubnet {{ network }}; +{% endfor %} {% for name, iface in bird__ospf_broadcast_interfaces.items() %} interface {{ name | enquote }} { type broadcast;