diff options
Diffstat (limited to 'table/message.go')
-rw-r--r-- | table/message.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/table/message.go b/table/message.go index 9a09d71f..07c15511 100644 --- a/table/message.go +++ b/table/message.go @@ -298,15 +298,7 @@ func createUpdateMsgFromPath(path *Path, msg *bgp.BGPMessage) *bgp.BGPMessage { } else { nlris = []bgp.AddrPrefixInterface{path.GetNlri()} } - - clonedAttrs := path.GetPathAttrs() - for i, a := range clonedAttrs { - if a.GetType() == bgp.BGP_ATTR_TYPE_MP_UNREACH_NLRI || a.GetType() == bgp.BGP_ATTR_TYPE_MP_REACH_NLRI { - clonedAttrs[i] = bgp.NewPathAttributeMpUnreachNLRI(nlris) - break - } - } - return bgp.NewBGPUpdateMessage(nil, clonedAttrs, nil) + return bgp.NewBGPUpdateMessage(nil, []bgp.PathAttributeInterface{bgp.NewPathAttributeMpUnreachNLRI(nlris)}, nil) } } else { if msg != nil { |