diff options
author | Sergey Elantsev <elantsev.s@yandex.ru> | 2021-01-27 21:43:39 +0300 |
---|---|---|
committer | Sergey Elantsev <elantsev.s@yandex.ru> | 2021-01-27 21:43:39 +0300 |
commit | 72027852e23647ecba0d79ff0f42787bfbe9a4c7 (patch) | |
tree | 1765094bf83faa31b32cbba85a673ae98d890018 /pkg | |
parent | 43c62634fdd8ff8e1deb2c20251bbc37718752aa (diff) |
go fmted
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/packet/bgp/bgp.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/packet/bgp/bgp.go b/pkg/packet/bgp/bgp.go index c55c4681..5112e7ae 100644 --- a/pkg/packet/bgp/bgp.go +++ b/pkg/packet/bgp/bgp.go @@ -2384,7 +2384,7 @@ func (er *EVPNEthernetAutoDiscoveryRoute) Len() int { func (er *EVPNEthernetAutoDiscoveryRoute) DecodeFromBytes(data []byte) error { er.RD = GetRouteDistinguisher(data) rdLen := er.RD.Len() - if len(data) < rdLen + 14 { // 14 is 10 for + if len(data) < rdLen+14 { // 14 is 10 for return NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, "bad Ethernet Auto-discovery Route length") } data = data[er.RD.Len():] @@ -2644,7 +2644,7 @@ func (er *EVPNMulticastEthernetTagRoute) Len() int { func (er *EVPNMulticastEthernetTagRoute) DecodeFromBytes(data []byte) error { er.RD = GetRouteDistinguisher(data) rdLen := er.RD.Len() - if len(data) < rdLen + 4 { + if len(data) < rdLen+4 { return NewMessageError(BGP_ERROR_UPDATE_MESSAGE_ERROR, BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST, nil, "invalid length of multicast ethernet tag route") } data = data[er.RD.Len():] |