diff options
-rw-r--r-- | gobgp/cmd/vrf.go | 8 | ||||
-rw-r--r-- | server/server.go | 4 | ||||
-rw-r--r-- | test/scenario_test/route_reflector_test.py | 1 | ||||
-rw-r--r-- | zebra/zapi.go | 2 |
4 files changed, 6 insertions, 9 deletions
diff --git a/gobgp/cmd/vrf.go b/gobgp/cmd/vrf.go index 4fe64802..84cb20fd 100644 --- a/gobgp/cmd/vrf.go +++ b/gobgp/cmd/vrf.go @@ -22,12 +22,11 @@ import ( "strconv" "strings" - "github.com/golang/protobuf/ptypes/any" - - "github.com/spf13/cobra" - api "github.com/osrg/gobgp/api" "github.com/osrg/gobgp/packet/bgp" + + "github.com/golang/protobuf/ptypes/any" + "github.com/spf13/cobra" ) func getVrfs() (vrfs, error) { @@ -167,7 +166,6 @@ func modVrf(typ string, args []string) error { } func NewVrfCmd() *cobra.Command { - ribCmd := &cobra.Command{ Use: CMD_RIB, Run: func(cmd *cobra.Command, args []string) { diff --git a/server/server.go b/server/server.go index c4e5f5de..31d2d42e 100644 --- a/server/server.go +++ b/server/server.go @@ -1711,8 +1711,8 @@ func (s *BgpServer) AddVrf(name string, id uint32, rd bgp.RouteDistinguisherInte AS: s.bgpConfig.Global.Config.As, LocalID: net.ParseIP(s.bgpConfig.Global.Config.RouterId).To4(), } - if pathList, e := s.globalRib.AddVrf(name, id, rd, im, ex, pi); e != nil { - return e + if pathList, err := s.globalRib.AddVrf(name, id, rd, im, ex, pi); err != nil { + return err } else if len(pathList) > 0 { s.propagateUpdate(nil, pathList) } diff --git a/test/scenario_test/route_reflector_test.py b/test/scenario_test/route_reflector_test.py index 3008ad14..53654c34 100644 --- a/test/scenario_test/route_reflector_test.py +++ b/test/scenario_test/route_reflector_test.py @@ -241,7 +241,6 @@ class GoBGPTestBase(unittest.TestCase): def test_12_routes_from_separate_rts_peers_are_isolated_by_rr(self): self.tyrell1.local("gobgp vrf add a1 rd 100:100 rt both 100:100") - self.tyrell1.local("gobgp vrf add a1 rd 100:100 rt both 100:100") self.tyrell1.local("gobgp vrf a1 rib add 10.10.0.0/16 local-pref 200") self.tyrell1.local("gobgp vrf a1 rib add 10.30.0.0/16") time.sleep(1) diff --git a/zebra/zapi.go b/zebra/zapi.go index 3b303082..667cfcd9 100644 --- a/zebra/zapi.go +++ b/zebra/zapi.go @@ -546,7 +546,7 @@ func NewClient(network, address string, typ ROUTE_TYPE, version uint8) (*Client, if err != nil { log.WithFields(log.Fields{ "Topic": "Zebra", - }).Warnf("failed to serialize: %s", m) + }).Warnf("failed to serialize: %v", m) continue } |