From b340c2b79ecde2ede5cc72c1b4f3077fc82e06b0 Mon Sep 17 00:00:00 2001 From: hellerve Date: Wed, 21 Dec 2016 12:16:29 +0100 Subject: [PATCH 01/17] hotfix: caching should reset --- bird/bird.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bird/bird.go b/bird/bird.go index f7669a5..2237f87 100644 --- a/bird/bird.go +++ b/bird/bird.go @@ -23,6 +23,15 @@ func fromCache(key string) (Parsed, bool) { Cache.RLock() val, ok := Cache.m[key] Cache.RUnlock() + if !ok { + return nil, false + } + + ttl, correct := val["ttl"].(time.Time) + if !correct || ttl.Before(time.Now()) { + return nil, false + } + return val, ok } From 50551ec071f6e4e2ee1680556803a2d2fc9a4fec Mon Sep 17 00:00:00 2001 From: hellerve Date: Wed, 21 Dec 2016 12:19:38 +0100 Subject: [PATCH 02/17] version bump --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index bd8bf88..943f9cb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.0 +1.7.1 From 9aeae5987409fa062a30a52033b2bd9a13493a53 Mon Sep 17 00:00:00 2001 From: hellerve Date: Mon, 2 Jan 2017 15:16:08 +0100 Subject: [PATCH 03/17] bugfix: make ratelimiting robust in nested calls --- VERSION | 2 +- bird/bird.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 943f9cb..f8a696c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.1 +1.7.2 diff --git a/bird/bird.go b/bird/bird.go index 2237f87..b554164 100644 --- a/bird/bird.go +++ b/bird/bird.go @@ -69,7 +69,7 @@ func checkRateLimit() bool { } RateLimitConf.RLock() - check = RateLimitConf.Conf.Reqs < 1 + check = RateLimitConf.Conf.Reqs > 1 RateLimitConf.RUnlock() if check { return false @@ -105,6 +105,9 @@ func RunAndParse(cmd string, parser func([]byte) Parsed) (Parsed, bool) { func Status() (Parsed, bool) { birdStatus, ok := RunAndParse("status", parseStatus) + if birdStatus == nil { + return birdStatus, ok + } status := birdStatus["status"].(Parsed) // Last Reconfig Timestamp source: @@ -142,6 +145,9 @@ func Protocols() (Parsed, bool) { func ProtocolsBgp() (Parsed, bool) { p, from_cache := Protocols() + if p == nil { + return p, from_cache + } protocols := p["protocols"].([]string) bgpProto := Parsed{} From d1a5d8ee94c7031c9455a15884135495496b8776 Mon Sep 17 00:00:00 2001 From: hellerve Date: Mon, 2 Jan 2017 15:20:52 +0100 Subject: [PATCH 04/17] bugfixing the bugfix --- bird/bird.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bird/bird.go b/bird/bird.go index b554164..6d3bc26 100644 --- a/bird/bird.go +++ b/bird/bird.go @@ -69,7 +69,7 @@ func checkRateLimit() bool { } RateLimitConf.RLock() - check = RateLimitConf.Conf.Reqs > 1 + check = RateLimitConf.Conf.Reqs < 1 RateLimitConf.RUnlock() if check { return false From 71cab9824b5cfae0405ce962bf5b2417bdaf7fe9 Mon Sep 17 00:00:00 2001 From: hellerve Date: Mon, 2 Jan 2017 16:22:08 +0100 Subject: [PATCH 05/17] only use key once --- bird/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bird/config.go b/bird/config.go index 89bf0d8..e3efb07 100644 --- a/bird/config.go +++ b/bird/config.go @@ -16,7 +16,7 @@ type BirdConfig struct { } type RateLimitConfig struct { - Reqs int `toml:"requests_per_minute"` + Reqs int Max int `toml:"requests_per_minute"` Enabled bool } From 79b939a8efde6e252da2c4922c7d4cabbfd5546a Mon Sep 17 00:00:00 2001 From: hellerve Date: Mon, 2 Jan 2017 16:22:27 +0100 Subject: [PATCH 06/17] vbump --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f8a696c..661e7ae 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.2 +1.7.3 From 62c529bb6c60e4d3de6288b83355926622191e18 Mon Sep 17 00:00:00 2001 From: hellerve Date: Mon, 2 Jan 2017 16:45:37 +0100 Subject: [PATCH 07/17] removed useless print --- bird/status.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/bird/status.go b/bird/status.go index fa38a34..609b357 100644 --- a/bird/status.go +++ b/bird/status.go @@ -24,8 +24,6 @@ func lastReconfigTimestampFromFileStat(filename string) string { func lastReconfigTimestampFromFileContent(filename string, regex string) string { rx := regexp.MustCompile(regex) - fmt.Println("Using regex:", regex) - // Read config file linewise file, err := os.Open(filename) if err != nil { From 959d10c0263a33696996feb00465fe2873b8570d Mon Sep 17 00:00:00 2001 From: hellerve Date: Mon, 2 Jan 2017 17:42:23 +0100 Subject: [PATCH 08/17] better regex for route parsing ("via" line) --- bird/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bird/parser.go b/bird/parser.go index 8a1fdde..a7e935f 100644 --- a/bird/parser.go +++ b/bird/parser.go @@ -128,7 +128,7 @@ func parseRoutes(input []byte) Parsed { route := Parsed{} start_def_rx := regexp.MustCompile(`^([0-9a-f\.\:\/]+)\s+via\s+([0-9a-f\.\:]+)\s+on\s+(\w+)\s+\[([\w\.:]+)\s+([0-9\-\:\s]+)(?:\s+from\s+([0-9a-f\.\:\/]+)){0,1}\]\s+(?:(\*)\s+){0,1}\((\d+)(?:\/\d+){0,1}\).*`) - second_rx := regexp.MustCompile(`^\s+via\s+([0-9a-f\.\:]+)\s+on\s+(\w+)\s+\[(\w+)\s+([0-9\-\:]+)(?:\s+from\s+([0-9a-f\.\:\/]+)){0,1}\]\s+(?:(\*)\s+){0,1}\((\d+)(?:\/\d+){0,1}\).*$`) + second_rx := regexp.MustCompile(`^\s+via\s+([0-9a-f\.\:]+)\s+on\s+([\w+)\s+\[([\w\.]+)\s+([0-9\-\:\s]+)(?:\s+from\s+([0-9a-f\.\:\/]+)){0,1}\]\s+(?:(\*)\s+){0,1}\((\d+)(?:\/\d+){0,1}\).*$`) type_rx := regexp.MustCompile(`^\s+Type:\s+(.*)\s*$`) bgp_rx := regexp.MustCompile(`^\s+BGP.(\w+):\s+(.+)\s*$`) community_rx := regexp.MustCompile(`^\((\d+),(\d+)\)`) From 3e557d93e0cda393f478ad60061a02f386e63266 Mon Sep 17 00:00:00 2001 From: hellerve Date: Mon, 2 Jan 2017 17:43:00 +0100 Subject: [PATCH 09/17] version bump --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 661e7ae..10c0880 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.3 +1.7.4 From 18102c58a9e6097179f689fcc73175ac3ac6d3d4 Mon Sep 17 00:00:00 2001 From: hellerve Date: Wed, 11 Jan 2017 16:15:19 +0100 Subject: [PATCH 10/17] added more elaborate installation and configuration instructions --- Makefile | 2 -- README.md | 14 ++++++++++++++ etc/ecix/birdwatcher.conf | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index bf75803..5a10620 100644 --- a/Makefile +++ b/Makefile @@ -99,5 +99,3 @@ clean: rm -f $(PROG)-osx-$(ARCH) rm -f $(PROG)-linux-$(ARCH) rm -rf $(DIST) - - diff --git a/README.md b/README.md index 8255a70..23e661a 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,20 @@ Running `go get github.com/ecix/birdwatcher` will give you a binary. You might need to cross-compile it for your bird-running servive (`GOARCH` and `GOOS` are your friends). +We provide a Makefile for more advanced compilation/configuration. +Running `make linux` will create a Linux executable (by default for +`amd64`, but that is configurable by providing the `ARCH` argument +to the Makefile). + +## Configuration + +An example config with sane defaults is provided in +[etc/ecix/birdwatcher.conf](https://github.com/ecix/birdwatcher/blob/master/etc/ecix/birdwatcher.conf). +You should be able to use it out of the box. If you need +to change it, it is well-commented and hopefully intuitive. +If you do not know how to configure it, please consider opening +[an issue](https://github.com/ecix/birdwatcher/issues/new). + ## Why The [INEX implementation](https://github.com/inex/birdseye) of diff --git a/etc/ecix/birdwatcher.conf b/etc/ecix/birdwatcher.conf index 5a5e20c..3f3d7e6 100644 --- a/etc/ecix/birdwatcher.conf +++ b/etc/ecix/birdwatcher.conf @@ -3,10 +3,10 @@ # [server] -# Restrict access to certain IPs. Leave empty to allow from all. +# Restrict access to certain IPs. Leave empty to allow from all. allow_from = [] -# All modules: +# All modules: # status # protocols # protocols_bgp From a82e9b48d86bd0681e0432c83f59414657f62bd9 Mon Sep 17 00:00:00 2001 From: hellerve Date: Wed, 11 Jan 2017 16:28:45 +0100 Subject: [PATCH 11/17] added section on building an rpm and deployment --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 23e661a..f418ced 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,23 @@ Running `make linux` will create a Linux executable (by default for `amd64`, but that is configurable by providing the `ARCH` argument to the Makefile). +### Building an RPM + +Building RPMs is supported through [fpm](https://github.com/jordansissel/fpm). +If you have `fpm` installed locally, you can run `make rpm` +to create a RPM in the folder `RPMS`. If you have a remote +build server with `fpm` installed, you can build and fetch +an RPM with `make remote_rpm BUILD_SERVER=` +(requires SSH access). + +### Deployment + +If you want to deploy `birdwatcher` on a system that uses +RPMs, you should be able to install it after following the +instructions on [building an RPM](#building-an-rpm). + +We do not currently support other deployment methods. + ## Configuration An example config with sane defaults is provided in From a2c829c34a6d7c03f396e7e1688f820edf459c8e Mon Sep 17 00:00:00 2001 From: hellerve Date: Wed, 11 Jan 2017 16:31:26 +0100 Subject: [PATCH 12/17] moved why to top --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f418ced..463c6a4 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,18 @@ Barry O'Donovan's [birds-eye](https://github.com/inex/birds-eye-design/) to [the BIRD routing daemon](http://bird.network.cz/). +## Why + +The [INEX implementation](https://github.com/inex/birdseye) of +birdseye runs PHP, which is not always desirable (and performant) +in a routeserver setting. By using Go, we are able to work with +regular binaries, which means deployment and maintenance might be +more convenient. + +Our version also has a few more capabilities, as you will +discover when looking at [the modules section](https://github.com/ecix/birdwatcher/blob/master/etc/ecix/birdwatcher.conf) +of the config. + ## Installation You will need to have go installed to build the package. @@ -43,14 +55,6 @@ to change it, it is well-commented and hopefully intuitive. If you do not know how to configure it, please consider opening [an issue](https://github.com/ecix/birdwatcher/issues/new). -## Why - -The [INEX implementation](https://github.com/inex/birdseye) of -birdseye runs PHP, which is not always desirable (and performant) -in a routeserver setting. By using Go, we are able to work with -regular binaries, which means deployment and maintenance might be -more convenient. - ## How In the background `birdwatcher` runs the `birdc` client, sends From 87252032bfee1ae2161aa0b612cfd16c21bbedde Mon Sep 17 00:00:00 2001 From: hellerve Date: Thu, 26 Jan 2017 12:12:02 +0100 Subject: [PATCH 13/17] version bump: get actual birdwatcher version in request --- VERSION | 2 +- birdwatcher.go | 4 ++++ endpoints/utils.go | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 10c0880..6a126f4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.4 +1.7.5 diff --git a/birdwatcher.go b/birdwatcher.go index ac55877..b86a4be 100644 --- a/birdwatcher.go +++ b/birdwatcher.go @@ -12,6 +12,9 @@ import ( "github.com/julienschmidt/httprouter" ) +//go:generate versionize +var VERSION = "1.7.5" + func isModuleEnabled(module string, modulesEnabled []string) bool { for _, enabled := range modulesEnabled { if enabled == module { @@ -93,6 +96,7 @@ func main() { bird6 := flag.Bool("6", false, "Use bird6 instead of bird") flag.Parse() + endpoints.VERSION = VERSION bird.InstallRateLimitReset() // Load configurations conf, err := LoadConfigs([]string{ diff --git a/endpoints/utils.go b/endpoints/utils.go index 1bf3b41..904c4ed 100644 --- a/endpoints/utils.go +++ b/endpoints/utils.go @@ -17,10 +17,13 @@ type APIInfo struct { CacheStatus CacheStatus `json:"cache_status"` } +// go generate does not work in subdirectories. Beautious. +var VERSION string + func GetApiInfo(from_cache bool) *APIInfo { ai := &APIInfo{} - ai.Version = "1.0" + ai.Version = VERSION ai.ResultFromCache = from_cache return ai From 27d9ada6eb5f19ae66fb47af66ab90819f3bf368 Mon Sep 17 00:00:00 2001 From: hellerve Date: Wed, 15 Feb 2017 12:20:55 +0100 Subject: [PATCH 14/17] added exported routes to peer --- Makefile | 1 - VERSION | 2 +- bird/bird.go | 4 ++++ bird/parser.go | 2 +- birdwatcher.go | 6 +++++- endpoints/endpoint.go | 7 +++++++ endpoints/routes.go | 14 ++++++++++++++ etc/ecix/birdwatcher.conf | 2 +- 8 files changed, 33 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5a10620..98ac2de 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ - # # Ecix Birdseye Makefile # diff --git a/VERSION b/VERSION index 6a126f4..91c74a5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.5 +1.7.7 diff --git a/bird/bird.go b/bird/bird.go index 6d3bc26..ab0da44 100644 --- a/bird/bird.go +++ b/bird/bird.go @@ -213,3 +213,7 @@ func RoutesLookupProtocol(net string, protocol string) (Parsed, bool) { return RunAndParse("route for '"+net+"' protocol '"+protocol+"' all", parseRoutes) } + +func RoutesPeer(peer string) (Parsed, bool) { + return RunAndParse("route export '"+peer+"'", parseRoutes) +} diff --git a/bird/parser.go b/bird/parser.go index a7e935f..4facb13 100644 --- a/bird/parser.go +++ b/bird/parser.go @@ -128,7 +128,7 @@ func parseRoutes(input []byte) Parsed { route := Parsed{} start_def_rx := regexp.MustCompile(`^([0-9a-f\.\:\/]+)\s+via\s+([0-9a-f\.\:]+)\s+on\s+(\w+)\s+\[([\w\.:]+)\s+([0-9\-\:\s]+)(?:\s+from\s+([0-9a-f\.\:\/]+)){0,1}\]\s+(?:(\*)\s+){0,1}\((\d+)(?:\/\d+){0,1}\).*`) - second_rx := regexp.MustCompile(`^\s+via\s+([0-9a-f\.\:]+)\s+on\s+([\w+)\s+\[([\w\.]+)\s+([0-9\-\:\s]+)(?:\s+from\s+([0-9a-f\.\:\/]+)){0,1}\]\s+(?:(\*)\s+){0,1}\((\d+)(?:\/\d+){0,1}\).*$`) + second_rx := regexp.MustCompile(`^\s+via\s+([0-9a-f\.\:]+)\s+on\s+([\w+)\s+\[([\w\.]+)\s+([0-9\-\:\s]+)(?:\s+from\s+([0-9a-f\.\:\/]+)){0,1}\]\s+(?:(\*)\s+){0,1}\((\d+)(?:\/\d+){0,1}\).*$`) type_rx := regexp.MustCompile(`^\s+Type:\s+(.*)\s*$`) bgp_rx := regexp.MustCompile(`^\s+BGP.(\w+):\s+(.+)\s*$`) community_rx := regexp.MustCompile(`^\((\d+),(\d+)\)`) diff --git a/birdwatcher.go b/birdwatcher.go index b86a4be..1932b60 100644 --- a/birdwatcher.go +++ b/birdwatcher.go @@ -13,7 +13,7 @@ import ( ) //go:generate versionize -var VERSION = "1.7.5" +var VERSION = "1.7.7" func isModuleEnabled(module string, modulesEnabled []string) bool { for _, enabled := range modulesEnabled { @@ -29,6 +29,7 @@ func makeRouter(config endpoints.ServerConfig) *httprouter.Router { r := httprouter.New() if isModuleEnabled("status", whitelist) { + r.GET("/version", endpoints.Version(VERSION)) r.GET("/status", endpoints.Endpoint(endpoints.Status)) } if isModuleEnabled("protocols", whitelist) { @@ -68,6 +69,9 @@ func makeRouter(config endpoints.ServerConfig) *httprouter.Router { r.GET("/route/net/:net", endpoints.Endpoint(endpoints.RouteNet)) r.GET("/route/net/:net/table/:table", endpoints.Endpoint(endpoints.RouteNetTable)) } + if isModuleEnabled("routes_peer", whitelist) { + r.GET("/routes/peer", endpoints.Endpoint(endpoints.RoutesPeer)) + } return r } diff --git a/endpoints/endpoint.go b/endpoints/endpoint.go index 587bb9d..dfe07b7 100644 --- a/endpoints/endpoint.go +++ b/endpoints/endpoint.go @@ -70,3 +70,10 @@ func Endpoint(wrapped endpoint) httprouter.Handle { w.Write(js) } } + +func Version(version string) httprouter.Handle { + return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + w.Header().Set("Content-Type", "text/plain") + w.Write([]byte(version)) + } +} diff --git a/endpoints/routes.go b/endpoints/routes.go index 36debdc..0ceff26 100644 --- a/endpoints/routes.go +++ b/endpoints/routes.go @@ -61,3 +61,17 @@ func RouteNet(r *http.Request, ps httprouter.Params) (bird.Parsed, bool) { func RouteNetTable(r *http.Request, ps httprouter.Params) (bird.Parsed, bool) { return bird.RoutesLookupTable(ps.ByName("net"), ps.ByName("table")) } + +func RoutesPeer(r *http.Request, ps httprouter.Params) (bird.Parsed, bool) { + qs := r.URL.Query() + peerl := qs["peer"] + if len(peerl) != 1 { + return bird.Parsed{"error": "need a peer as single query parameter"}, false + } + + peer, err := ValidateProtocolParam(peerl[0]) + if err != nil { + return bird.Parsed{"error": fmt.Sprintf("%s", err)}, false + } + return bird.RoutesPeer(peer) +} diff --git a/etc/ecix/birdwatcher.conf b/etc/ecix/birdwatcher.conf index 3f3d7e6..0f184e7 100644 --- a/etc/ecix/birdwatcher.conf +++ b/etc/ecix/birdwatcher.conf @@ -21,7 +21,7 @@ allow_from = [] # routes_filtered # routes_prefixed # -modules_enabled = ["status", "protocols_bgp", "routes_protocol"] +modules_enabled = ["status", "protocols_bgp", "routes_protocol", "routes_peer"] [status] # From 8449a677a01739939408b4d42d07d8c6d5fb1ae3 Mon Sep 17 00:00:00 2001 From: hellerve Date: Thu, 16 Feb 2017 13:52:47 +0100 Subject: [PATCH 15/17] added large communities to possible bgp values --- bird/parser.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bird/parser.go b/bird/parser.go index 4facb13..8e87500 100644 --- a/bird/parser.go +++ b/bird/parser.go @@ -132,6 +132,7 @@ func parseRoutes(input []byte) Parsed { type_rx := regexp.MustCompile(`^\s+Type:\s+(.*)\s*$`) bgp_rx := regexp.MustCompile(`^\s+BGP.(\w+):\s+(.+)\s*$`) community_rx := regexp.MustCompile(`^\((\d+),(\d+)\)`) + large_community_rx := regexp.MustCompile(`^\((\d+),(\d+),(\d+)\)`) for _, line := range lines { if specialLine(line) || (len(route) == 0 && emptyLine(line)) { continue @@ -186,6 +187,18 @@ func parseRoutes(input []byte) Parsed { } } bgp["communities"] = communities + } else if groups[1] == "large_community" { + communities := [][]int64{} + for _, community := range strings.Split(groups[2], " ") { + if large_community_rx.MatchString(community) { + com_groups := large_community_rx.FindStringSubmatch(community) + maj := parseInt(com_groups[1]) + min := parseInt(com_groups[2]) + pat := parseInt(com_groups[3]) + communities = append(communities, []int64{maj, min, pat}) + } + } + bgp["large_communities"] = communities } else if groups[1] == "as_path" { bgp["as_path"] = strings.Split(groups[2], " ") } else { From 5caff4e33d84ab501b9c3ff02daca443c7413244 Mon Sep 17 00:00:00 2001 From: hellerve Date: Thu, 16 Feb 2017 15:54:04 +0100 Subject: [PATCH 16/17] bugfix: timestamps only had date in them --- bird/parser.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bird/parser.go b/bird/parser.go index 8e87500..2173cbe 100644 --- a/bird/parser.go +++ b/bird/parser.go @@ -46,9 +46,9 @@ func parseStatus(input []byte) Parsed { start_line_rx := regexp.MustCompile(`^BIRD\s([0-9\.]+)\s*$`) router_id_rx := regexp.MustCompile(`^Router\sID\sis\s([0-9\.]+)\s*$`) - current_server_rx := regexp.MustCompile(`^Current\sserver\stime\sis\s([0-9\-]+)\s([0-9\:]+)\s*$`) - last_reboot_rx := regexp.MustCompile(`^Last\sreboot\son\s([0-9\-]+)\s([0-9\:]+)\s*$`) - last_reconfig_rx := regexp.MustCompile(`^Last\sreconfiguration\son\s([0-9\-]+)\s([0-9\:]+)\s*$`) + current_server_rx := regexp.MustCompile(`^Current\sserver\stime\sis\s([0-9\-]+\s[0-9\:]+)\s*$`) + last_reboot_rx := regexp.MustCompile(`^Last\sreboot\son\s([0-9\-]+\s[0-9\:]+)\s*$`) + last_reconfig_rx := regexp.MustCompile(`^Last\sreconfiguration\son\s([0-9\-]+\s[0-9\:]+)\s*$`) for _, line := range lines { if start_line_rx.MatchString(line) { From b6a2fb70c8fab00038598de2f346ce19ccb0ce52 Mon Sep 17 00:00:00 2001 From: hellerve Date: Thu, 16 Feb 2017 17:25:35 +0100 Subject: [PATCH 17/17] bugfix: readded ttl to bgp protocol --- VERSION | 2 +- bird/bird.go | 3 ++- birdwatcher.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 91c74a5..84298f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.7 +1.7.8 diff --git a/bird/bird.go b/bird/bird.go index ab0da44..41c6028 100644 --- a/bird/bird.go +++ b/bird/bird.go @@ -159,7 +159,8 @@ func ProtocolsBgp() (Parsed, bool) { } } - return Parsed{"protocols": bgpProto}, from_cache + + return Parsed{"protocols": bgpProto, "ttl": p["ttl"]}, from_cache } func Symbols() (Parsed, bool) { diff --git a/birdwatcher.go b/birdwatcher.go index 1932b60..7554f50 100644 --- a/birdwatcher.go +++ b/birdwatcher.go @@ -13,7 +13,7 @@ import ( ) //go:generate versionize -var VERSION = "1.7.7" +var VERSION = "1.7.8" func isModuleEnabled(module string, modulesEnabled []string) bool { for _, enabled := range modulesEnabled {