diff options
-rw-r--r-- | api/grpc_server.go | 2 | ||||
-rw-r--r-- | packet/bgp/bgp.go | 4 | ||||
-rw-r--r-- | packet/bgp/validate.go | 10 | ||||
-rw-r--r-- | server/fsm.go | 2 | ||||
-rw-r--r-- | server/server.go | 2 | ||||
-rw-r--r-- | server/zclient.go | 2 | ||||
-rw-r--r-- | table/destination.go | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go index 0b316a0f..d1b82aeb 100644 --- a/api/grpc_server.go +++ b/api/grpc_server.go @@ -729,7 +729,7 @@ func (s *Server) api2PathList(resource Resource, ApiPathList []*Path) ([]*table. if _, ok := seen[p.GetType()]; !ok { seen[p.GetType()] = true } else { - return nil, fmt.Errorf("the path attribute apears twice. Type : " + strconv.Itoa(int(p.GetType()))) + return nil, fmt.Errorf("the path attribute appears twice. Type : " + strconv.Itoa(int(p.GetType()))) } switch p.GetType() { case bgp.BGP_ATTR_TYPE_NEXT_HOP: diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go index fb9e2a1c..babfd96f 100644 --- a/packet/bgp/bgp.go +++ b/packet/bgp/bgp.go @@ -2966,7 +2966,7 @@ func parseDecValuesCmd(myCmd string, validationFunc func(int) error) ([][2]int, return nil, err } } else { - err := fmt.Errorf("Malformated not or equal operator") + err := fmt.Errorf("Malformed not or equal operator") return nil, err } case "t", "f": // we could be facing true or false, let's check @@ -6117,7 +6117,7 @@ func (s ValidationState) String() string { case VALIDATION_STATE_INVALID: return "invalid" } - return fmt.Sprintf("unknown validatation state(%d)", s) + return fmt.Sprintf("unknown validation state(%d)", s) } type ValidationExtended struct { diff --git a/packet/bgp/validate.go b/packet/bgp/validate.go index eefb7afe..9553d6d5 100644 --- a/packet/bgp/validate.go +++ b/packet/bgp/validate.go @@ -17,7 +17,7 @@ func ValidateUpdateMsg(m *BGPUpdate, rfs map[RouteFamily]BGPAddPathMode, doConfe if len(m.NLRI) > 0 || len(m.WithdrawnRoutes) > 0 { if _, ok := rfs[RF_IPv4_UC]; !ok { - return false, NewMessageError(0, 0, nil, fmt.Sprintf("Address-family rf %d not avalible for session", RF_IPv4_UC)) + return false, NewMessageError(0, 0, nil, fmt.Sprintf("Address-family rf %d not available for session", RF_IPv4_UC)) } } @@ -92,7 +92,7 @@ func ValidateAttribute(a PathAttributeInterface, rfs map[RouteFamily]BGPAddPathM for _, prefix := range l { rf := AfiSafiToRouteFamily(prefix.AFI(), prefix.SAFI()) if _, ok := rfs[rf]; !ok { - return NewMessageError(0, 0, nil, fmt.Sprintf("Address-family %s not avalible for this session", rf)) + return NewMessageError(0, 0, nil, fmt.Sprintf("Address-family %s not available for this session", rf)) } switch rf { case RF_FS_IPv4_UC, RF_FS_IPv6_UC, RF_FS_IPv4_VPN, RF_FS_IPv6_VPN, RF_FS_L2_VPN: @@ -125,7 +125,7 @@ func ValidateAttribute(a PathAttributeInterface, rfs map[RouteFamily]BGPAddPathM case *PathAttributeMpUnreachNLRI: rf := AfiSafiToRouteFamily(p.AFI, p.SAFI) if _, ok := rfs[rf]; !ok { - return false, NewMessageError(0, 0, nil, fmt.Sprintf("Address-family rf %d not avalible for session", rf)) + return false, NewMessageError(0, 0, nil, fmt.Sprintf("Address-family rf %d not available for session", rf)) } if err := checkPrefix(p.Value); err != nil { return false, err @@ -133,7 +133,7 @@ func ValidateAttribute(a PathAttributeInterface, rfs map[RouteFamily]BGPAddPathM case *PathAttributeMpReachNLRI: rf := AfiSafiToRouteFamily(p.AFI, p.SAFI) if _, ok := rfs[rf]; !ok { - return false, NewMessageError(0, 0, nil, fmt.Sprintf("Address-family rf %d not avalible for session", rf)) + return false, NewMessageError(0, 0, nil, fmt.Sprintf("Address-family rf %d not available for session", rf)) } if err := checkPrefix(p.Value); err != nil { return false, err @@ -263,7 +263,7 @@ func ValidateBGPMessage(m *BGPMessage) error { func ValidateOpenMsg(m *BGPOpen, expectedAS uint32) (uint32, error) { if m.Version != 4 { - return 0, NewMessageError(BGP_ERROR_OPEN_MESSAGE_ERROR, BGP_ERROR_SUB_UNSUPPORTED_VERSION_NUMBER, nil, fmt.Sprintf("upsuppored version %d", m.Version)) + return 0, NewMessageError(BGP_ERROR_OPEN_MESSAGE_ERROR, BGP_ERROR_SUB_UNSUPPORTED_VERSION_NUMBER, nil, fmt.Sprintf("unsupported version %d", m.Version)) } as := uint32(m.MyAS) diff --git a/server/fsm.go b/server/fsm.go index 8001478e..e28ceee2 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -1099,7 +1099,7 @@ func (h *FSMHandler) opensent() (bgp.FSMState, FsmStateReason) { "Topic": "Peer", "Key": fsm.pConf.State.NeighborAddress, "State": fsm.state.String(), - }).Infof("skiped asn negotiation: peer-as: %d, peer-type: %s", peerAs, typ) + }).Infof("skipped asn negotiation: peer-as: %d, peer-type: %s", peerAs, typ) } else { fsm.pConf.State.PeerType = fsm.pConf.Config.PeerType } diff --git a/server/server.go b/server/server.go index b6cfbf0e..28749f2c 100644 --- a/server/server.go +++ b/server/server.go @@ -72,7 +72,7 @@ func NewTCPListener(address string, port uint32, ch chan *net.TCPConn) (*TCPList log.WithFields(log.Fields{ "Topic": "Peer", "Key": addr, - }).Warnf("cannot set TTL(=%d) for TCPLisnter: %s", 255, err) + }).Warnf("cannot set TTL(=%d) for TCPListener: %s", 255, err) } closeCh := make(chan struct{}) diff --git a/server/zclient.go b/server/zclient.go index 05de78df..89747fe3 100644 --- a/server/zclient.go +++ b/server/zclient.go @@ -123,7 +123,7 @@ func (m *nexthopTrackingManager) loop() { log.WithFields(log.Fields{ "Topic": "Zebra", "Event": "Nexthop Tracking", - }).Debugf("penalty 500 chrged: penalty: %d", penalty) + }).Debugf("penalty 500 charged: penalty: %d", penalty) m.appendPathList(paths) diff --git a/table/destination.go b/table/destination.go index 0ad0f6f9..9631fc1c 100644 --- a/table/destination.go +++ b/table/destination.go @@ -500,7 +500,7 @@ func (dest *Destination) computeKnownBestPath() (*Path, BestPathReason, error) { log.WithFields(log.Fields{ "Topic": "Table", - }).Debugf("computeKnownBestPath known pathlist: %d", len(dest.knownPathList)) + }).Debugf("computeKnownBestPath knownPathList: %d", len(dest.knownPathList)) // We pick the first path as current best path. This helps in breaking // tie between two new paths learned in one cycle for which best-path |