diff options
author | Niklas Yann Wettengel <niyawe@niyawe.de> | 2021-12-12 15:15:03 +0100 |
---|---|---|
committer | Niklas Yann Wettengel <niyawe@niyawe.de> | 2021-12-12 15:15:03 +0100 |
commit | b53a8cf2283b2d6debb94cd399a72d25da0d7c82 (patch) | |
tree | e91b4b549150219b82e5a3995f0f3515154e2a7e /roles/install_babeld/templates/babeld.conf.j2 | |
parent | e75acd9a72df39269496abb7207decfc210efaa6 (diff) |
merge fastd and uplink nodes
Diffstat (limited to 'roles/install_babeld/templates/babeld.conf.j2')
-rw-r--r-- | roles/install_babeld/templates/babeld.conf.j2 | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/roles/install_babeld/templates/babeld.conf.j2 b/roles/install_babeld/templates/babeld.conf.j2 index 1fac52e..c5cdda0 100644 --- a/roles/install_babeld/templates/babeld.conf.j2 +++ b/roles/install_babeld/templates/babeld.conf.j2 @@ -5,22 +5,12 @@ ipv6-subtrees true # You must provide at least one interface for babeld to operate on. -{% if ('fastd' in group_names) %} -{% for peer in groups['uplink'] %} -interface bb{{ hostvars[peer]['wireguard_bb_name'] }} -{% endfor %} -{% endif %} -{% if 'uplink' in group_names %} -{% for peer in groups['fastd'] %} -interface bb{{ hostvars[peer]['wireguard_bb_name'] }} -{% endfor %} -{% for peer in groups['uplink'] | difference([inventory_hostname]) %} +{% for peer in groups['fastd'] | difference([inventory_hostname]) %} interface bb{{ hostvars[peer]['wireguard_bb_name'] }} {% endfor %} {% for peer in wireguard_bb_peers|default([]) %} interface bb{{ peer.name }} {% endfor %} -{% endif %} # Global options you might want to set. There are many more, see the man page. #debug 1 @@ -37,22 +27,15 @@ import-table 42 reflect-kernel-metric true # Filtering rules. -{% if 'uplink' in group_names %} in ip 10.222.0.0/16 allow in ip 2a03:2260:1016::/48 allow in ip 2003:46:e028::/48 allow # finzelberg in ip fd62:44e1:da::/48 allow in deny # ignore default routes on uplinks -{% endif %} -{% if 'mullvad_uplink' in group_names %} -redistribute if mullvad metric 256 -{% endif %} -{% if 'ffrl_uplink' in group_names %} {% for peer in ffrl_peers %} redistribute if {{ peer.name }} metric 128 {% endfor %} -{% endif %} # Only redistribute addresses from a given prefix, to avoid redistributing # all local addresses redistribute ip 10.222.0.0/16 allow @@ -60,11 +43,3 @@ redistribute ip 2a03:2260:1016::/48 allow redistribute ip 64:ff9b::/96 allow redistribute ip fd62:44e1:da::/48 allow redistribute local deny - -{% if ('fastd' in group_names) and preferred_uplink is defined %} -{% for peer in groups['uplink'] %} -{% if not hostvars[peer]['wireguard_bb_name'] == preferred_uplink %} -in if bb{{ hostvars[peer]['wireguard_bb_name'] }} metric 64 -{% endif %} -{% endfor %} -{% endif %} |