diff options
-rw-r--r-- | table/path.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/table/path.go b/table/path.go index cad8cbfa..3b3982f6 100644 --- a/table/path.go +++ b/table/path.go @@ -288,7 +288,11 @@ func UpdatePathAttrs(global *config.Global, peer *config.Neighbor, info *PeerInf path.SetNexthop(localAddress) path.setPathAttr(bgp.NewPathAttributeOriginatorId(info.LocalID.String())) } else if path.getPathAttr(bgp.BGP_ATTR_TYPE_ORIGINATOR_ID) == nil { - path.setPathAttr(bgp.NewPathAttributeOriginatorId(info.ID.String())) + if path.IsLocal() { + path.setPathAttr(bgp.NewPathAttributeOriginatorId(global.Config.RouterId)) + } else { + path.setPathAttr(bgp.NewPathAttributeOriginatorId(info.ID.String())) + } } // When an RR reflects a route, it MUST prepend the local CLUSTER_ID to the CLUSTER_LIST. // If the CLUSTER_LIST is empty, it MUST create a new one. |