[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#939126: jacktrip: Other clients unable to connect to jacktrip server



Package: jacktrip
Version: 1.1~repack-6
Severity: important
Tags: patch

Dear Maintainer,

Other clients hang at "Waiting for Peer..." when attempting to
connect to jacktrip running as a server. This is because of a change to
the way that QHostAddress works in Qt5, resulting in the return of an
IPv4-mapped address instead of an IPv4 address. I've written and
attached a patch that fixes this (restoring the behaviour shown by Qt4).

Cheers,
Aaron


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.2.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages jacktrip depends on:
ii  libc6                             2.28-10
ii  libgcc1                           1:9.2.1-6
ii  libjack-jackd2-0 [libjack-0.125]  1.9.12~dfsg-2+b1
ii  libqt5core5a                      5.11.3+dfsg1-4
ii  libqt5network5                    5.11.3+dfsg1-4
ii  librtaudio6                       5.0.0~ds-3
ii  libstdc++6                        9.2.1-6

jacktrip recommends no packages.

jacktrip suggests no packages.

-- no debconf information
--- jacktrip-1.1~repack/src/JackTrip.cpp	2019-09-01 22:29:24.000000000 +1000
+++ JackTrip.cpp	2019-09-01 22:24:03.033620369 +1000
@@ -451,6 +451,15 @@
   UdpSockTemp.close(); // close the socket
 
   mPeerAddress = peerHostAddress.toString();
+  
+  // Convert any IPv4-mapped address to an actual IPv4 address
+  // (Due to a change in the way that QHostAddress works in Qt5)
+  bool couldConvert;
+  QHostAddress ipv4Address(peerHostAddress.toIPv4Address(&couldConvert));
+  if (couldConvert) {
+    mPeerAddress = ipv4Address.toString();
+  }
+
   cout << "Client Connection Received from IP : " 
        << qPrintable(mPeerAddress) << endl;
   cout << gPrintSeparator << endl;
--- jacktrip-1.1~repack/src/JackTrip.cpp	2019-09-01 22:29:24.000000000 +1000
+++ JackTrip.cpp	2019-09-01 22:24:03.033620369 +1000
@@ -451,6 +451,15 @@
   UdpSockTemp.close(); // close the socket
 
   mPeerAddress = peerHostAddress.toString();
+  
+  // Convert any IPv4-mapped address to an actual IPv4 address
+  // (Due to a change in the way that QHostAddress works in Qt5)
+  bool couldConvert;
+  QHostAddress ipv4Address(peerHostAddress.toIPv4Address(&couldConvert));
+  if (couldConvert) {
+    mPeerAddress = ipv4Address.toString();
+  }
+
   cout << "Client Connection Received from IP : " 
        << qPrintable(mPeerAddress) << endl;
   cout << gPrintSeparator << endl;

Reply to: