summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/table/message.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pkg/table/message.go')
-rw-r--r--internal/pkg/table/message.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/pkg/table/message.go b/internal/pkg/table/message.go
index 9bd843e2..369fb6d6 100644
--- a/internal/pkg/table/message.go
+++ b/internal/pkg/table/message.go
@@ -447,7 +447,9 @@ func (p *packerV4) pack(options ...*bgp.MarshallingOption) []*bgp.BGPMessage {
// we should make sure that we next-hop exists in pathattrs
// while we build the update message
// we do not want to modify the `path` though
- attrs = append(attrs, bgp.NewPathAttributeNextHop(paths[0].GetNexthop().String()))
+ if paths[0].getPathAttr(bgp.BGP_ATTR_TYPE_NEXT_HOP) == nil {
+ attrs = append(attrs, bgp.NewPathAttributeNextHop(paths[0].GetNexthop().String()))
+ }
attrsLen := 0
for _, a := range attrs {
attrsLen += a.Len()