From d0ea67cde6339457d85a2cbee45dfe1b15dac54a Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 2 Feb 2023 18:31:54 -0800 Subject: [PATCH] ejabberd: Fix making call connections when using TURN Closes: #2318. We currently set 'restricted: false' to both stun and turn server configuration in ejabberd. This works for stun but for turn, ejabberd assumes that authentication is not needed even though it is needed for our coturn setup. Drop the configuration option entirely as the desired values are already default in both stun and turn cases. Tests: - On a fresh setup, install coturn and ejabberd. In ejabberd.yaml, the stun/turn configuration does not have the restricted option. - On a container without the patch, install coturn and ejabberd. Configuration has restricted option. Apply the patch, ejabberd setup is updated and restricted option is removed. - Test that calls can't be made with TURN with 'restricted: false' set. Changing it to true for TURN configuration allows the calls to be established. Remove the restricted option entirely also works. This was tested by @Znoteer in #2318. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/ejabberd/__init__.py | 2 +- plinth/modules/ejabberd/privileged.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plinth/modules/ejabberd/__init__.py b/plinth/modules/ejabberd/__init__.py index b4ebd11b1..2cc217a6f 100644 --- a/plinth/modules/ejabberd/__init__.py +++ b/plinth/modules/ejabberd/__init__.py @@ -50,7 +50,7 @@ class EjabberdApp(app_module.App): app_id = 'ejabberd' - _version = 5 + _version = 6 def __init__(self): """Create components for the app.""" diff --git a/plinth/modules/ejabberd/privileged.py b/plinth/modules/ejabberd/privileged.py index d0e9c3bd4..118ad299e 100644 --- a/plinth/modules/ejabberd/privileged.py +++ b/plinth/modules/ejabberd/privileged.py @@ -292,7 +292,6 @@ def _generate_service(uri: str) -> dict: "port": int(port), "type": typ, "transport": transport, - "restricted": False }