Skip to content
Snippets Groups Projects
Unverified Commit de79cc54 authored by Daniel Czerwonk's avatar Daniel Czerwonk Committed by GitHub
Browse files

Merge branch 'master' into feature/multi_rib

parents 69031a5d 86f17a1f
No related branches found
No related tags found
No related merge requests found
...@@ -209,10 +209,8 @@ func (u *UpdateSender) bgpUpdateMultiProtocol(pfxs []bnet.Prefix, pa *packet.Pat ...@@ -209,10 +209,8 @@ func (u *UpdateSender) bgpUpdateMultiProtocol(pfxs []bnet.Prefix, pa *packet.Pat
} }
func (u *UpdateSender) copyAttributesWithoutNextHop(pa *packet.PathAttribute) (attrs *packet.PathAttribute, nextHop bnet.IP) { func (u *UpdateSender) copyAttributesWithoutNextHop(pa *packet.PathAttribute) (attrs *packet.PathAttribute, nextHop bnet.IP) {
cur := pa
var curCopy, lastCopy *packet.PathAttribute var curCopy, lastCopy *packet.PathAttribute
for cur != nil { for cur := pa; cur != nil; cur = cur.Next {
if cur.TypeCode == packet.NextHopAttr { if cur.TypeCode == packet.NextHopAttr {
nextHop = cur.Value.(bnet.IP) nextHop = cur.Value.(bnet.IP)
} else { } else {
...@@ -225,8 +223,6 @@ func (u *UpdateSender) copyAttributesWithoutNextHop(pa *packet.PathAttribute) (a ...@@ -225,8 +223,6 @@ func (u *UpdateSender) copyAttributesWithoutNextHop(pa *packet.PathAttribute) (a
} }
lastCopy = curCopy lastCopy = curCopy
} }
cur = cur.Next
} }
return attrs, nextHop return attrs, nextHop
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment