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:
parent
cd6cec9e48
commit
36b9bb03d2
2 changed files with 12 additions and 4 deletions
11
bird/bird.go
11
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)
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue