diff --git a/cmd/site-replication.go b/cmd/site-replication.go index 55e9dd5c0..382dec852 100644 --- a/cmd/site-replication.go +++ b/cmd/site-replication.go @@ -3980,6 +3980,9 @@ func (c *SiteReplicationSys) EditPeerCluster(ctx context.Context, peer madmin.Pe } if peer.DefaultBandwidth.IsSet { + if peer.DeploymentID == globalDeploymentID() { + return madmin.ReplicateEditStatus{}, errSRInvalidRequest(fmt.Errorf("invalid deployment id specified: expecting a peer deployment-id to be specified for restricting bandwidth from %s, found self %s", peer.Name, globalDeploymentID())) + } pi.DefaultBandwidth = peer.DefaultBandwidth pi.DefaultBandwidth.UpdatedAt = UTCNow() successMsg = fmt.Sprintf("%s\n- default bandwidth %v for peer %s", successMsg, peer.DefaultBandwidth.Limit, peer.Name)