From 1b10fdf03d0f093c8277240add8b022efe515407 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 29 Mar 2021 00:52:59 +0200 Subject: [PATCH] dn42: implement multiprotocol peering --- flake.lock | 8 ++++---- hosts/containers/dn42/default.nix | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 45c9afd2..b1f3abb7 100644 --- a/flake.lock +++ b/flake.lock @@ -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" }, diff --git a/hosts/containers/dn42/default.nix b/hosts/containers/dn42/default.nix index ae4b3ee8..4a201ee9 100644 --- a/hosts/containers/dn42/default.nix +++ b/hosts/containers/dn42/default.nix @@ -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}; }