1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

moved to parser config and updated RoutesNoExport

This commit is contained in:
Matthias Hannig 2017-05-29 09:50:20 +02:00
parent cd6cec9e48
commit 36b9bb03d2
2 changed files with 12 additions and 4 deletions

View file

@ -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)
}

View file

@ -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'