forked from zentralwerk/network
nixos-module/container/bird: style
This commit is contained in:
parent
a62b7dbc80
commit
df5fee8f69
|
@ -35,28 +35,30 @@ in
|
|||
protocol kernel K4 {
|
||||
learn;
|
||||
ipv4 {
|
||||
${lib.optionalString (!isUpstream) ''
|
||||
export all;
|
||||
''}
|
||||
${lib.optionalString isUpstream ''
|
||||
# Do not set another default route on upstreams
|
||||
${if isUpstream
|
||||
then ''
|
||||
# Install all routes but the default route on upstreams
|
||||
export 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 {
|
||||
learn;
|
||||
ipv6 {
|
||||
${lib.optionalString (!isUpstream) ''
|
||||
export all;
|
||||
''}
|
||||
${lib.optionalString isUpstream ''
|
||||
# Do not set another default route on upstreams
|
||||
${if isUpstream
|
||||
then ''
|
||||
# Install all routes but the default route on upstreams
|
||||
export where net != ::/0;
|
||||
# Learn the upstream default route
|
||||
import where net = ::/0;
|
||||
''
|
||||
else ''
|
||||
export all;
|
||||
''}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user