diff options
Diffstat (limited to 'table/message.go')
-rw-r--r-- | table/message.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/table/message.go b/table/message.go index a2b7f926..cb77013b 100644 --- a/table/message.go +++ b/table/message.go @@ -278,8 +278,16 @@ func createUpdateMsgFromPath(path *Path, msg *bgp.BGPMessage) *bgp.BGPMessage { u := msg.Body.(*bgp.BGPUpdate) u.NLRI = append(u.NLRI, nlri) } else { - pathAttrs := path.GetPathAttrs() - return bgp.NewBGPUpdateMessage(nil, pathAttrs, []*bgp.IPAddrPrefix{nlri}) + attrs := make([]bgp.PathAttributeInterface, 0, 8) + for _, p := range path.GetPathAttrs() { + switch p.GetType() { + case bgp.BGP_ATTR_TYPE_MP_REACH_NLRI: + case bgp.BGP_ATTR_TYPE_MP_UNREACH_NLRI: + default: + attrs = append(attrs, p) + } + } + return bgp.NewBGPUpdateMessage(nil, attrs, []*bgp.IPAddrPrefix{nlri}) } } } else { |