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 ''
export all;
import filter {
${lib.concatMapStrings (net:
lib.optionalString (
config.site.net.${net}.subnet4 or null != null
) ''
if net ~ [ ${config.site.net.${net}.subnet4} ] then {
# Learn route of local network ${net}
accept;
}
'') (builtins.attrNames hostConf.interfaces)}
${lib.concatMapStrings (net: ''
if net ~ [ ${lib.concatStringsSep " " (builtins.attrValues config.site.net.${net}.subnets6)} ] then {
# Learn route of local network ${net}
accept;
}
'') (builtins.attrNames hostConf.interfaces)}
reject;
};
''}