diff options
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/mumble/files/pinger_fix.patch | 69 | ||||
-rw-r--r-- | media-sound/mumble/files/tls12_strong_ciphers.patch | 28 | ||||
-rw-r--r-- | media-sound/mumble/mumble-scm.ebuild | 1 |
3 files changed, 91 insertions, 7 deletions
diff --git a/media-sound/mumble/files/pinger_fix.patch b/media-sound/mumble/files/pinger_fix.patch new file mode 100644 index 0000000..a701100 --- /dev/null +++ b/media-sound/mumble/files/pinger_fix.patch @@ -0,0 +1,69 @@ +diff --git a/src/mumble/ServerHandler.cpp b/src/mumble/ServerHandler.cpp +index 7e30e76a..d02ad0c1 100644 +--- a/src/mumble/ServerHandler.cpp ++++ b/src/mumble/ServerHandler.cpp +@@ -349,10 +349,9 @@ void ServerHandler::run() { + + tTimestamp.restart(); + +- // Setup ping timer; +- QTimer *ticker = new QTimer(this); +- connect(ticker, SIGNAL(timeout()), this, SLOT(sendPing())); +- ticker->start(5000); ++ ping_ticker = new QTimer(this); ++ connect(ping_ticker, SIGNAL(timeout()), this, SLOT(sendPing())); ++ + + g.mw->rtLast = MumbleProto::Reject_RejectType_None; + +@@ -370,6 +369,8 @@ void ServerHandler::run() { + shouldTryNextTargetServer = false; + } + ++ ping_ticker->stop(); ++ + if (qusUdp) { + QMutexLocker qml(&qmUdp); + +@@ -384,7 +385,6 @@ void ServerHandler::run() { + qusUdp = NULL; + } + +- ticker->stop(); + + ConnectionPtr cptr(cConnection); + if (cptr) { +@@ -619,7 +619,7 @@ void ServerHandler::serverConnectionStateChanged(QAbstractSocket::SocketState st + tConnectionTimeoutTimer = new QTimer(); + connect(tConnectionTimeoutTimer, SIGNAL(timeout()), this, SLOT(serverConnectionTimeoutOnConnect())); + tConnectionTimeoutTimer->setSingleShot(true); +- tConnectionTimeoutTimer->start(30000); ++ tConnectionTimeoutTimer->start(120000); //this may take some time on server with large dh + } else if (state == QAbstractSocket::ConnectedState) { + // Start TLS handshake + qtsSock->startClientEncryption(); +@@ -651,6 +651,11 @@ void ServerHandler::serverConnectionConnected() { + return; + } + ++ // Setup ping timer; ++ //do this after succesfull connection, not before ++ ping_ticker->start(10000); //do not waste too much traffic here, 10 seconds instead of 5 is ok ++ ++ + MumbleProto::Version mpv; + mpv.set_release(u8(QLatin1String(MUMBLE_RELEASE))); + +diff --git a/src/mumble/ServerHandler.h b/src/mumble/ServerHandler.h +index bb558c4b..130e65aa 100644 +--- a/src/mumble/ServerHandler.h ++++ b/src/mumble/ServerHandler.h +@@ -77,7 +77,7 @@ class ServerHandler : public QThread { + public: + Timer tTimestamp; + int iInFlightTCPPings; +- QTimer *tConnectionTimeoutTimer; ++ QTimer *tConnectionTimeoutTimer, *ping_ticker; + QList<QSslError> qlErrors; + QList<QSslCertificate> qscCert; + QSslCipher qscCipher; diff --git a/media-sound/mumble/files/tls12_strong_ciphers.patch b/media-sound/mumble/files/tls12_strong_ciphers.patch index 86297a1..5fab971 100644 --- a/media-sound/mumble/files/tls12_strong_ciphers.patch +++ b/media-sound/mumble/files/tls12_strong_ciphers.patch @@ -1,17 +1,18 @@ diff --git a/src/Connection.cpp b/src/Connection.cpp -index 5dc7443e..c7fc968f 100644 +index 5dc7443e..2287f174 100644 --- a/src/Connection.cpp +++ b/src/Connection.cpp -@@ -25,6 +25,9 @@ HANDLE Connection::hQoS = NULL; - Connection::Connection(QObject *p, QSslSocket *qtsSock) : QObject(p) { - qtsSocket = qtsSock; +@@ -27,7 +27,9 @@ Connection::Connection(QObject *p, QSslSocket *qtsSock) : QObject(p) { qtsSocket->setParent(this); + iPacketLength = -1; + bDisconnectedEmitted = false; +- +#if QT_VERSION >= 0x050500 + qtsSocket->setProtocol(QSsl::TlsV1_2OrLater); +#endif - iPacketLength = -1; - bDisconnectedEmitted = false; - + static bool bDeclared = false; + if (! bDeclared) { + bDeclared = true; diff --git a/src/SSL.cpp b/src/SSL.cpp index 7f7e8121..16cddd28 100644 --- a/src/SSL.cpp @@ -25,3 +26,16 @@ index 7f7e8121..16cddd28 100644 } QList<QSslCipher> MumbleSSL::ciphersFromOpenSSLCipherString(QString cipherString) { +diff --git a/src/mumble/ServerHandler.cpp b/src/mumble/ServerHandler.cpp +index 7e30e76a..60c39121 100644 +--- a/src/mumble/ServerHandler.cpp ++++ b/src/mumble/ServerHandler.cpp +@@ -335,7 +335,7 @@ void ServerHandler::run() { + + + #if QT_VERSION >= 0x050500 +- qtsSock->setProtocol(QSsl::TlsV1_0OrLater); ++ qtsSock->setProtocol(QSsl::TlsV1_2OrLater); + #elif QT_VERSION >= 0x050400 + // In Qt 5.4, QSsl::SecureProtocols is equivalent + // to "TLSv1.0 or later", which we require. diff --git a/media-sound/mumble/mumble-scm.ebuild b/media-sound/mumble/mumble-scm.ebuild index bfbdd21..4746fc7 100644 --- a/media-sound/mumble/mumble-scm.ebuild +++ b/media-sound/mumble/mumble-scm.ebuild @@ -56,6 +56,7 @@ PATCHES=( "${FILESDIR}"/tls12_strong_ciphers.patch "${FILESDIR}"/higher_opus_complexity.patch "${FILESDIR}"/allow_higher_bitrate_and_frame_size.patch + "${FILESDIR}"/pinger_fix.patch ) #S="${WORKDIR}/${MY_P}" |