diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-10-12 11:37:54 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-11-01 21:56:21 +0900 |
commit | d8a897a0dd04a0d641ea10622180938c76f8e924 (patch) | |
tree | eb803e611de80e3ab41f1470be3702387a662327 /packet/bgp/validate.go | |
parent | fbc493411b3656c97cc979d086e5eecb942859c1 (diff) |
Fix some typos found by spell checker
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'packet/bgp/validate.go')
-rw-r--r-- | packet/bgp/validate.go | 10 |
1 files changed, 5 insertions, 5 deletions
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) |