nixos-module/container/bird: fix ospf priority

This commit is contained in:
Astro 2021-05-02 20:01:59 +02:00
parent eb6ddf1648
commit c15f716dd1
1 changed files with 6 additions and 4 deletions

View File

@ -144,8 +144,6 @@ in
${lib.optionalString isUpstream '' ${lib.optionalString isUpstream ''
# OSPFv2 to advertise my default route # OSPFv2 to advertise my default route
protocol ospf v2 ZW4_${hostName} { protocol ospf v2 ZW4_${hostName} {
# Become the designated router
priority 10;
ipv4 { ipv4 {
export where net = 0.0.0.0/0; export where net = 0.0.0.0/0;
}; };
@ -156,6 +154,9 @@ in
# Enable OSPF only on interfaces with a secret. # Enable OSPF only on interfaces with a secret.
lib.optionalString (config.site.net.${net}.ospf.secret != null) '' lib.optionalString (config.site.net.${net}.ospf.secret != null) ''
interface "${net}" instance ${toString hostConf.ospf.upstreamInstance} { interface "${net}" instance ${toString hostConf.ospf.upstreamInstance} {
# Become the designated router
priority 10;
authentication cryptographic; authentication cryptographic;
password "${config.site.net.${net}.ospf.secret}"; password "${config.site.net.${net}.ospf.secret}";
}; };
@ -246,8 +247,6 @@ in
${lib.optionalString isUpstream '' ${lib.optionalString isUpstream ''
# OSPFv3 to advertise my default route # OSPFv3 to advertise my default route
protocol ospf v3 ZW6_${hostName} { protocol ospf v3 ZW6_${hostName} {
# Become the designated router
priority 10;
ipv6 { ipv6 {
export where net = ::/0; export where net = ::/0;
}; };
@ -258,6 +257,9 @@ in
# Enable OSPF only on interfaces with a secret. # Enable OSPF only on interfaces with a secret.
lib.optionalString (config.site.net.${net}.ospf.secret != null) '' lib.optionalString (config.site.net.${net}.ospf.secret != null) ''
interface "${net}" instance ${toString hostConf.ospf.upstreamInstance} { interface "${net}" instance ${toString hostConf.ospf.upstreamInstance} {
# Become the designated router
priority 10;
#authentication cryptographic; #authentication cryptographic;
#password "${config.site.net.${net}.ospf.secret}"; #password "${config.site.net.${net}.ospf.secret}";
}; };