Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce channelcountlimit to limit max channels per server #3420

Merged
merged 3 commits into from Jun 14, 2018

Conversation

@hacst
Copy link
Member

commented Jun 13, 2018

Having to many channels on a server can impact performance to the point
of making the instance unusably slow. This can be a problem for hosters
that allow their users unlimited channel creation.

This patch introduces a new per-server configuration parameter
channelcountlimit which can be used to configure a maximum number of
channels that may be created on each of the virtual servers. Once the
limit is reached channel creation will be rejected with permission
denied.

To allow a translated error message we have to bump the client version
to 1.3.1 to be able to use a fallback message for older clients.

As usual dbus, ice and grpc can ignore this limit. It is only enforced
against clients.

Note that I have not done extensive testing of this patch. The setting seems to work as expected when set from the ini but I did not try whether setting it on-the-fly and per-server works as expected. Also the version bump is a bit confusing considering we haven't released 1.3.0 yet. Maybe we shouldn't do that and "break" compat with the other pre-release versions? If 1.3 release is still a while away this could be backported.

Introduce channelcountlimit to limit max channels per server
Having to many channels on a server can impact performance to the point
of making the instance unusably slow. This can be a problem for hosters
that allow their users unlimited channel creation.

This patch introduces a new per-server configuration parameter
channelcountlimit which can be used to configure a maximum number of
channels that may be created on each of the virtual servers. Once the
limit is reached channel creation will be rejected with permission
denied.

To allow a translated error message we have to bump the client version
to 1.3.1 to be able to use a fallback message for older clients.

As usual dbus, ice and grpc can ignore this limit. It is only enforced
against clients.
@@ -896,6 +896,11 @@ void Server::msgChannelState(ServerUser *uSource, MumbleProto::ChannelState &msg
if (! p || qsName.isNull())
return;

if (iChannelCountLimit == 0 || qhChannels.count() >= iChannelCountLimit) {

This comment has been minimized.

Copy link
@davidebeatrici

davidebeatrici Jun 13, 2018

Member

Shouldn't this be:

if (iChannelCountLimit != 0 && qhChannels.count() >= iChannelCountLimit) {

?

This comment has been minimized.

Copy link
@hacst

hacst Jun 13, 2018

Author Member

You are totally right. Fixed.

@@ -8,7 +8,7 @@ include(../qmake/qt.pri)
include(../qmake/rcc.pri)
include(../qmake/pkgconfig.pri)

VERSION = 1.3.0
VERSION = 1.3.1

This comment has been minimized.

Copy link
@davidebeatrici

davidebeatrici Jun 13, 2018

Member

I would leave the version as it is.

hacst added 2 commits Jun 13, 2018
Accept incompatibility with other 1.3 pre-release snapshots
Those now only say permission denied without a proper
reason.

@hacst hacst merged commit 23eb3d1 into mumble-voip:master Jun 14, 2018

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.