summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-10-12 11:37:54 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-11-01 21:56:21 +0900
commitd8a897a0dd04a0d641ea10622180938c76f8e924 (patch)
treeeb803e611de80e3ab41f1470be3702387a662327 /packet/bgp
parentfbc493411b3656c97cc979d086e5eecb942859c1 (diff)
Fix some typos found by spell checker
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'packet/bgp')
-rw-r--r--packet/bgp/bgp.go4
-rw-r--r--packet/bgp/validate.go10
2 files changed, 7 insertions, 7 deletions
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)