From 5a88fedebeb2e04995600736de45d7d1a7a6b115 Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 18 Sep 2022 01:47:40 +0200 Subject: [PATCH] nixos-module/container/bird: add escaping --- nix/nixos-module/container/bird.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nix/nixos-module/container/bird.nix b/nix/nixos-module/container/bird.nix index aedbffa..17c3154 100644 --- a/nix/nixos-module/container/bird.nix +++ b/nix/nixos-module/container/bird.nix @@ -208,7 +208,9 @@ in ${text} # OSPFv2 to receive a default route from ${upstream} - protocol ospf v2 ZW4_${upstream} { + protocol ospf v2 ZW4_${ + builtins.replaceStrings [ "-" ] [ "_" ] upstream + } { ipv4 { import filter { preference = preference + ${toString (100 - n)}; @@ -324,7 +326,9 @@ in ${text} # OSPFv3 to receive a default route from ${upstream} - protocol ospf v3 ZW6_${upstream} { + protocol ospf v3 ZW6_${ + builtins.replaceStrings [ "-" ] [ "_" ] upstream + } { ipv6 { import filter { preference = preference + ${toString (100 - n)};