From 27c11bad83cbae21b0c3cb8be0d65696cb0f4c56 Mon Sep 17 00:00:00 2001 From: Daniel Czerwonk <daniel@dan-nrw.de> Date: Mon, 25 Jun 2018 18:53:55 +0200 Subject: [PATCH] removed commentet code --- protocols/bgp/packet/path_attributes.go | 34 ------------------------- 1 file changed, 34 deletions(-) diff --git a/protocols/bgp/packet/path_attributes.go b/protocols/bgp/packet/path_attributes.go index b62aacda..a859f4a0 100644 --- a/protocols/bgp/packet/path_attributes.go +++ b/protocols/bgp/packet/path_attributes.go @@ -587,40 +587,6 @@ func (pa *PathAttribute) serializeLargeCommunities(buf *bytes.Buffer) uint8 { return length } -/*func (pa *PathAttribute) PrependASPath(prepend []uint32) { - if pa.TypeCode != ASPathAttr { - return - } - - asPath := pa.Value.(ASPath) - asPathSegementCount := len(asPath) - currentSegment := asPathSegementCount - 1 - - newSegmentNeeded := false - if asPath[asPathSegementCount-1].Type == ASSequence { - newSegmentNeeded = true - } else { - if len(asPath[asPathSegementCount-1].ASNs) >= MaxASNsSegment { - newSegmentNeeded = true - } - } - - for _, asn := range prepend { - if newSegmentNeeded { - segment := ASPathSegment{ - Type: ASSequence, - ASNs: make([]uint32, 0), - }, - } - - asPath[currentSegment].ASNs = append(asPath[currentSegment].ASNs, asn) - if len(asPath[asPathSegementCount-1].ASNs) >= MaxASNsSegment { - newSegmentNeeded = true - } - } - -}*/ - // ParseASPathStr converts an AS path from string representation info an PathAttribute object func ParseASPathStr(asPathString string) (*PathAttribute, error) { asPath := ASPath{} -- GitLab