From 699f29e271b758ebdb7cf2d381e658da1725fbdf Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 22 Mar 2022 23:07:53 +0100 Subject: [PATCH] freifunk: enable ZW6_${upstream} --- hosts/containers/freifunk/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/hosts/containers/freifunk/default.nix b/hosts/containers/freifunk/default.nix index 5b301661..55710f00 100644 --- a/hosts/containers/freifunk/default.nix +++ b/hosts/containers/freifunk/default.nix @@ -353,6 +353,26 @@ in { }; '') upstreams)} + ${lib.concatStrings (lib.imap0 (i: upstream: '' + # OSPFv3 to receive a default route from ${upstream} + protocol ospf v3 ZW6_${upstream} { + ipv6 { + import filter { + preference = preference + ${toString (200 - i)}; + accept; + }; + }; + area 0 { + interface "core" instance ${toString zentralwerk.lib.config.site.hosts.${upstream}.ospf.upstreamInstance} { + hello 10; + wait 20; + authentication cryptographic; + password "${pkgs.zentralwerk-ospf-message-digest-key}"; + }; + }; + }; + '') upstreams)} + router id ${coreAddress}; ''; };