dn42: allow for multiprotocol="ipv4"
This commit is contained in:
parent
39c7a9bf1f
commit
4df5d4cda5
|
@ -350,11 +350,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1642963136,
|
"lastModified": 1644512129,
|
||||||
"narHash": "sha256-h/C8HnGVJLxnYbI/WUrD4F/YXN3uI8d+zY2QWt2PrTc=",
|
"narHash": "sha256-bdJS7RrYenDaS1ZgkL+yNUmHbgV1dWOqKfvuxuitYDg=",
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"rev": "4a5aba5a32695015c9b7a4a1f3648d3d8e34a91d",
|
"rev": "3b17877a7c41946277af91d46a800a298d3e6b09",
|
||||||
"revCount": 120,
|
"revCount": 121,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@gitea.c3d2.de/c3d2-admins/secrets.git"
|
"url": "ssh://gitea@gitea.c3d2.de/c3d2-admins/secrets.git"
|
||||||
},
|
},
|
||||||
|
|
|
@ -126,13 +126,13 @@ in {
|
||||||
bgpNeighbors = builtins.concatStringsSep "\n" (builtins.attrValues
|
bgpNeighbors = builtins.concatStringsSep "\n" (builtins.attrValues
|
||||||
(builtins.mapAttrs (name: conf@{ multiprotocol ? false, ... }:
|
(builtins.mapAttrs (name: conf@{ multiprotocol ? false, ... }:
|
||||||
let
|
let
|
||||||
neighbor4 = if conf ? address4 && !multiprotocol then ''
|
neighbor4 = if conf ? address4 && multiprotocol != "ipv6" then ''
|
||||||
protocol bgp ${name}_4 from dnpeers {
|
protocol bgp ${name}_4 from dnpeers {
|
||||||
neighbor ${conf.address4} as ${builtins.toString conf.asn};
|
neighbor ${conf.address4} as ${builtins.toString conf.asn};
|
||||||
}
|
}
|
||||||
'' else
|
'' else
|
||||||
"";
|
"";
|
||||||
neighbor6 = if conf ? address6 then ''
|
neighbor6 = if conf ? address6 && multiprotocol != "ipv4" then ''
|
||||||
protocol bgp ${name}_6 from dnpeers {
|
protocol bgp ${name}_6 from dnpeers {
|
||||||
neighbor ${conf.address6}%${interface} as ${
|
neighbor ${conf.address6}%${interface} as ${
|
||||||
builtins.toString conf.asn
|
builtins.toString conf.asn
|
||||||
|
|
Loading…
Reference in New Issue