nixos-module/container/bird: style
This commit is contained in:
parent
a62b7dbc80
commit
df5fee8f69
|
@ -35,29 +35,31 @@ in
|
||||||
protocol kernel K4 {
|
protocol kernel K4 {
|
||||||
learn;
|
learn;
|
||||||
ipv4 {
|
ipv4 {
|
||||||
${lib.optionalString (!isUpstream) ''
|
${if isUpstream
|
||||||
export all;
|
then ''
|
||||||
''}
|
# Install all routes but the default route on upstreams
|
||||||
${lib.optionalString isUpstream ''
|
export where net != 0.0.0.0/0;
|
||||||
# Do not set another default route on upstreams
|
# Learn the upstream default route
|
||||||
export where net != 0.0.0.0/0;
|
import where net = 0.0.0.0/0;
|
||||||
# Learn the upstream default route
|
''
|
||||||
import where net = 0.0.0.0/0;
|
else ''
|
||||||
''}
|
export all;
|
||||||
|
''}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
protocol kernel K6 {
|
protocol kernel K6 {
|
||||||
learn;
|
learn;
|
||||||
ipv6 {
|
ipv6 {
|
||||||
${lib.optionalString (!isUpstream) ''
|
${if isUpstream
|
||||||
export all;
|
then ''
|
||||||
''}
|
# Install all routes but the default route on upstreams
|
||||||
${lib.optionalString isUpstream ''
|
export where net != ::/0;
|
||||||
# Do not set another default route on upstreams
|
# Learn the upstream default route
|
||||||
export where net != ::/0;
|
import where net = ::/0;
|
||||||
# Learn the upstream default route
|
''
|
||||||
import where net = ::/0;
|
else ''
|
||||||
''}
|
export all;
|
||||||
|
''}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
protocol device {
|
protocol device {
|
||||||
|
|
Loading…
Reference in New Issue