diff options
-rw-r--r-- | packet/bgp.go | 2 | ||||
-rw-r--r-- | packet/bgp_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index 5cd748e7..464ec018 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -1290,7 +1290,7 @@ func (n *EVPNNLRI) DecodeFromBytes(data []byte) error { return err } n.RouteTypeData = r - return n.RouteTypeData.DecodeFromBytes(data) + return n.RouteTypeData.DecodeFromBytes(data[:n.Length]) } func (n *EVPNNLRI) Serialize() ([]byte, error) { diff --git a/packet/bgp_test.go b/packet/bgp_test.go index 97734606..64228a36 100644 --- a/packet/bgp_test.go +++ b/packet/bgp_test.go @@ -92,7 +92,7 @@ func update() *BGPMessage { &EVPNMacIPAdvertisementRoute{NewRouteDistinguisherFourOctetAS(5, 6), EthernetSegmentIdentifier{ESI_ARBITRARY, make([]byte, 9)}, 3, 48, mac, 32, net.ParseIP("192.2.1.2"), - []uint32{3}}), + []uint32{3, 4}}), NewEVPNNLRI(EVPN_INCLUSIVE_MULTICAST_ETHERNET_TAG, 0, &EVPNMulticastEthernetTagRoute{NewRouteDistinguisherFourOctetAS(5, 6), 3, 32, net.ParseIP("192.2.1.2")}), NewEVPNNLRI(EVPN_ETHERNET_SEGMENT_ROUTE, 0, |