summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--openswitch/openswitch.go11
-rw-r--r--server/server.go2
-rw-r--r--table/destination.go7
-rw-r--r--table/path.go9
-rw-r--r--tools/route-server/quagga-rsconfig.go9
-rw-r--r--zebra/zapi.go5
6 files changed, 24 insertions, 19 deletions
diff --git a/openswitch/openswitch.go b/openswitch/openswitch.go
index 0b405a9f..4f6d7e0c 100644
--- a/openswitch/openswitch.go
+++ b/openswitch/openswitch.go
@@ -17,6 +17,11 @@ package openswitch
import (
"fmt"
+ "net"
+ "reflect"
+ "strconv"
+ "time"
+
log "github.com/Sirupsen/logrus"
api "github.com/osrg/gobgp/api"
"github.com/osrg/gobgp/gobgp/cmd"
@@ -25,10 +30,6 @@ import (
ovsdb "github.com/socketplane/libovsdb"
"golang.org/x/net/context"
"google.golang.org/grpc"
- "net"
- "reflect"
- "strconv"
- "time"
)
const (
@@ -171,7 +172,7 @@ func parseRouteToGobgp(route ovsdb.RowUpdate, nexthops map[string]ovsdb.Row) (*a
if len(nh) == 0 {
log.WithFields(log.Fields{
"Topic": "openswitch",
- }).Debug("nexthop addres does not exist")
+ }).Debug("nexthop address does not exist")
} else if len(nh) == 1 {
if net.ParseIP(nh[0].(string)) == nil {
return nil, isWithdraw, isFromGobgp, fmt.Errorf("invalid nexthop address")
diff --git a/server/server.go b/server/server.go
index aaae63bc..bc0aa59c 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1674,7 +1674,7 @@ func (server *BgpServer) addNeighbor(c *config.Neighbor) error {
addr := c.Config.NeighborAddress
if _, y := server.neighborMap[addr]; y {
- return fmt.Errorf("Can't overwrite the exising peer: %s", addr)
+ return fmt.Errorf("Can't overwrite the existing peer: %s", addr)
}
if server.bgpConfig.Global.Config.Port > 0 {
diff --git a/table/destination.go b/table/destination.go
index d4c24fa2..f6b3f7f9 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -19,11 +19,12 @@ import (
"bytes"
"encoding/binary"
"fmt"
+ "net"
+ "sort"
+
log "github.com/Sirupsen/logrus"
"github.com/osrg/gobgp/config"
"github.com/osrg/gobgp/packet/bgp"
- "net"
- "sort"
)
var SelectionOptions config.RouteSelectionOptionsConfig
@@ -338,7 +339,7 @@ func (dest *Destination) explicitWithdraw() paths {
isFound = true
// this path is referenced in peer's adj-rib-in
// when there was no policy modification applied.
- // we sould flag IsWithdraw down after use to avoid
+ // we could flag IsWithdraw down after use to avoid
// a path with IsWithdraw flag exists in adj-rib-in
path.IsWithdraw = true
matches = append(matches, withdraw)
diff --git a/table/path.go b/table/path.go
index 08c92089..c75ca579 100644
--- a/table/path.go
+++ b/table/path.go
@@ -18,13 +18,14 @@ package table
import (
"bytes"
"fmt"
- log "github.com/Sirupsen/logrus"
- "github.com/osrg/gobgp/config"
- "github.com/osrg/gobgp/packet/bgp"
"math"
"net"
"sort"
"time"
+
+ log "github.com/Sirupsen/logrus"
+ "github.com/osrg/gobgp/config"
+ "github.com/osrg/gobgp/packet/bgp"
)
const (
@@ -683,7 +684,7 @@ func (path *Path) SetCommunities(communities []uint32, doReplace bool) {
}
// RemoveCommunities removes specific communities.
-// If the length of communites is 0, it does nothing.
+// If the length of communities is 0, it does nothing.
// If all communities are removed, it removes Communities path attribute itself.
func (path *Path) RemoveCommunities(communities []uint32) int {
diff --git a/tools/route-server/quagga-rsconfig.go b/tools/route-server/quagga-rsconfig.go
index efd17cb3..dfd086e7 100644
--- a/tools/route-server/quagga-rsconfig.go
+++ b/tools/route-server/quagga-rsconfig.go
@@ -3,14 +3,15 @@ package main
import (
"bytes"
"fmt"
- "github.com/BurntSushi/toml"
- "github.com/jessevdk/go-flags"
- "github.com/osrg/gobgp/config"
"io/ioutil"
"log"
"net"
"os"
"path/filepath"
+
+ "github.com/BurntSushi/toml"
+ "github.com/jessevdk/go-flags"
+ "github.com/osrg/gobgp/config"
)
type QuaggaConfig struct {
@@ -80,7 +81,7 @@ func create_config_files(nr int, outputDir string) {
func main() {
var opts struct {
ClientNumber int `short:"n" long:"client-number" description:"specfying the number of clients" default:"8"`
- OutputDir string `short:"c" long:"output" description:"specifing the output directory"`
+ OutputDir string `short:"c" long:"output" description:"specifying the output directory"`
}
parser := flags.NewParser(&opts, flags.Default)
diff --git a/zebra/zapi.go b/zebra/zapi.go
index 1f995248..69f72420 100644
--- a/zebra/zapi.go
+++ b/zebra/zapi.go
@@ -18,11 +18,12 @@ package zebra
import (
"encoding/binary"
"fmt"
- log "github.com/Sirupsen/logrus"
"io"
"net"
"strings"
"syscall"
+
+ log "github.com/Sirupsen/logrus"
)
const (
@@ -488,7 +489,7 @@ func (b *InterfaceUpdateBody) Serialize() ([]byte, error) {
}
func (b *InterfaceUpdateBody) String() string {
- s := fmt.Sprintf("name: %s, idx: %d, status: %s, flags: %s, metric: %d, mtu: %d, mtu6: %d, bandwith: %d", b.Name, b.Index, b.Status, intfflag2string(b.Flags), b.Metric, b.MTU, b.MTU6, b.Bandwidth)
+ s := fmt.Sprintf("name: %s, idx: %d, status: %s, flags: %s, metric: %d, mtu: %d, mtu6: %d, bandwidth: %d", b.Name, b.Index, b.Status, intfflag2string(b.Flags), b.Metric, b.MTU, b.MTU6, b.Bandwidth)
if len(b.HardwareAddr) > 0 {
return s + fmt.Sprintf(", mac: %s", b.HardwareAddr)
}