From 36b9bb03d23562aeac6c12c9f3c5acd4d818fd26 Mon Sep 17 00:00:00 2001 From: Matthias Hannig Date: Mon, 29 May 2017 09:50:20 +0200 Subject: [PATCH] moved to parser config and updated RoutesNoExport --- bird/bird.go | 11 +++++++++++ etc/ecix/birdwatcher.conf | 5 +---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bird/bird.go b/bird/bird.go index 44d0529..e8f23f3 100644 --- a/bird/bird.go +++ b/bird/bird.go @@ -199,6 +199,17 @@ func RoutesExport(protocol string) (Parsed, bool) { } func RoutesNoExport(protocol string) (Parsed, bool) { + + // In case we have a multi table setup, we have to query + // the pipe protocol. + if ParserConf.PerPeerTables && + strings.HasPrefix(protocol, ParserConf.PeerProtocolPrefix) { + + // Replace prefix + protocol = ParserConf.PipeProtocolPrefix + + protocol[len(ParserConf.PeerProtocolPrefix):] + } + return RunAndParse("route noexport '"+protocol+"' all", parseRoutes) } diff --git a/etc/ecix/birdwatcher.conf b/etc/ecix/birdwatcher.conf index 8a55bdc..95506cc 100644 --- a/etc/ecix/birdwatcher.conf +++ b/etc/ecix/birdwatcher.conf @@ -55,11 +55,8 @@ birdc = "/sbin/birdc6" # Remove fields e.g. interface filter_fields = [] - -[per_peer_tables] # Enable support for multitable configurations -enabled = true +per_peer_tables = true peer_protocol_prefix = 'ID' pipe_protocol_prefix = 'P' -