From 446f93bf007c7ecd292515f2784ea456234d7ec5 Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 12 Mar 2021 23:38:17 +0100 Subject: [PATCH] dn42: clean up bgp filters --- hosts/containers/dn42/default.nix | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/hosts/containers/dn42/default.nix b/hosts/containers/dn42/default.nix index a5ca1e5e..ae4b3ee8 100644 --- a/hosts/containers/dn42/default.nix +++ b/hosts/containers/dn42/default.nix @@ -173,26 +173,24 @@ in { template bgp dnpeers { local as 64699; ipv4 { - import all; + import filter { + if proto = "hq4" then reject; + accept; + }; export filter { - if source = RTS_BGP then { - accept; - } - if proto = "hq4" then { - accept; - } + if source = RTS_BGP then accept; + if proto = "hq4" then accept; reject; }; }; ipv6 { - import all; + import filter { + if proto = "hq6" then reject; + accept; + }; export filter { - if source = RTS_BGP then { - accept; - } - if proto = "hq6" then { - accept; - } + if source = RTS_BGP then accept; + if proto = "hq6" then accept; reject; }; };