dn42: implement multiprotocol peering
This commit is contained in:
parent
427e4ede0d
commit
1b10fdf03d
|
@ -58,11 +58,11 @@
|
|||
},
|
||||
"secrets": {
|
||||
"locked": {
|
||||
"lastModified": 1616412180,
|
||||
"narHash": "sha256-NIZ7+4hDOF8i+aUeDW0scXnE90b1FbvXuwD8eyx3XLo=",
|
||||
"lastModified": 1616965517,
|
||||
"narHash": "sha256-7l/7ULKLaLadOxmJj1BU+z8LfgBG9J3RThy0OYe2Iwo=",
|
||||
"ref": "master",
|
||||
"rev": "0185c43bf98d7c47b0e83c6f88ffcc2aa7d97b0d",
|
||||
"revCount": 96,
|
||||
"rev": "18e29791779aa8054a57054e1d1aa081d88324be",
|
||||
"revCount": 97,
|
||||
"type": "git",
|
||||
"url": "ssh://git@gitea.c3d2.de:2222/c3d2-admins/secrets.git"
|
||||
},
|
||||
|
|
|
@ -113,9 +113,9 @@ in {
|
|||
enable = true;
|
||||
config = let
|
||||
bgpNeighbors = builtins.concatStringsSep "\n" (builtins.attrValues
|
||||
(builtins.mapAttrs (name: conf:
|
||||
(builtins.mapAttrs (name: conf@{ multiprotocol ? false, ... }:
|
||||
let
|
||||
neighbor4 = if conf ? address4 then ''
|
||||
neighbor4 = if conf ? address4 && !multiprotocol then ''
|
||||
protocol bgp ${name}_4 from dnpeers {
|
||||
neighbor ${conf.address4} as ${builtins.toString conf.asn};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue