Version in base suite: 6.7-3.1+deb13u3 Base version: brltty_6.7-3.1+deb13u3 Target version: brltty_6.7-3.1+deb13u4 Base file: /srv/ftp-master.debian.org/ftp/pool/main/b/brltty/brltty_6.7-3.1+deb13u3.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/b/brltty/brltty_6.7-3.1+deb13u4.dsc changelog | 7 +++++++ patches/git-localhost-timeout | 36 ++++++++++++++++++++++++++++++++++++ patches/series | 1 + 3 files changed, 44 insertions(+) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpgs1iw_g_/brltty_6.7-3.1+deb13u3.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpgs1iw_g_/brltty_6.7-3.1+deb13u4.dsc: no acceptable signature found diff -Nru brltty-6.7/debian/changelog brltty-6.7/debian/changelog --- brltty-6.7/debian/changelog 2026-01-21 18:00:18.000000000 +0000 +++ brltty-6.7/debian/changelog 2026-09-19 12:27:54.000000000 +0000 @@ -1,3 +1,10 @@ +brltty (6.7-3.1+deb13u4) trixie; urgency=medium + + * patches/git-localhost-timeout: Make connections to localhost timeout after + 0.1s (Closes: Bug#1087173) + + -- Samuel Thibault Sat, 19 Sep 2026 14:27:54 +0200 + brltty (6.7-3.1+deb13u3) trixie; urgency=medium * patches/systemd-vtnr: Fix getting vtnr from systemd. diff -Nru brltty-6.7/debian/patches/git-localhost-timeout brltty-6.7/debian/patches/git-localhost-timeout --- brltty-6.7/debian/patches/git-localhost-timeout 1970-01-01 00:00:00.000000000 +0000 +++ brltty-6.7/debian/patches/git-localhost-timeout 2026-09-19 12:27:04.000000000 +0000 @@ -0,0 +1,36 @@ +commit cc58966ee2133520b224f6be61d87843989cb1d4 +Author: Samuel Thibault +Date: Sat Sep 12 11:47:07 2026 +0200 + + brlapi: Make connections to localhost timeout after 0.1s + + We have seen system configurations where connecting to IPv6 ::1 would just + hang instead of reporting ECONNREFUSED when brltty is not running, probably + due to various misconfigured firewalls and whatnot. That is a broken system + configuration, but better avoid the issue from brlapi by just expecting the + connection to be fast on localhost. + +diff --git a/Programs/brlapi_client.c b/Programs/brlapi_client.c +index 4b8d6187e..91d80e640 100644 +--- a/Programs/brlapi_client.c ++++ b/Programs/brlapi_client.c +@@ -929,6 +929,19 @@ static int tryHost(brlapi_handle_t *handle, const char *hostAndPort) { + } + #endif /* !__MINGW32__ && !HAVE_POLL */ + ++ const struct in6_addr ip6_localhost = IN6ADDR_LOOPBACK_INIT; ++ ++ if ((cur->ai_family == AF_INET ++ && (ntohl(((struct sockaddr_in *)cur->ai_addr)->sin_addr.s_addr) & IN_CLASSA_NET) ++ == (INADDR_LOOPBACK & IN_CLASSA_NET)) ++ || (cur->ai_family == AF_INET6 ++ && !memcmp(cur->ai_addr, &ip6_localhost, sizeof(ip6_localhost)))) { ++ /* Local connection, it should be fast, otherwise it means we have a ++ * firewall blocking us, and then better not wait unnecessarily. */ ++ struct timeval tv = { .tv_usec = 100000 }; ++ setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)); ++ } ++ + if (connect(sockfd, cur->ai_addr, cur->ai_addrlen)<0) { + closeSocketDescriptor(sockfd); + continue; diff -Nru brltty-6.7/debian/patches/series brltty-6.7/debian/patches/series --- brltty-6.7/debian/patches/series 2026-01-21 18:00:18.000000000 +0000 +++ brltty-6.7/debian/patches/series 2026-09-19 12:27:29.000000000 +0000 @@ -8,3 +8,4 @@ noverbose-bluetooth noverbose-usbfs systemd-vtnr +git-localhost-timeout