nixos-module/container/bird: fix import ipv6 routes from kernel

This commit is contained in:
Astro 2022-10-31 23:26:13 +01:00
parent d3f1e4c778
commit ead4199b3f
1 changed files with 6 additions and 9 deletions

View File

@ -72,15 +72,12 @@ in
else '' else ''
export all; export all;
import filter { import filter {
${lib.concatMapStrings (net: ${lib.concatMapStrings (net: ''
lib.optionalString ( if net ~ [ ${lib.concatStringsSep " " (builtins.attrValues config.site.net.${net}.subnets6)} ] then {
config.site.net.${net}.subnet4 or null != null # Learn route of local network ${net}
) '' accept;
if net ~ [ ${config.site.net.${net}.subnet4} ] then { }
# Learn route of local network ${net} '') (builtins.attrNames hostConf.interfaces)}
accept;
}
'') (builtins.attrNames hostConf.interfaces)}
reject; reject;
}; };
''} ''}