From a68729def05dfbaabbd1466297920e4fc8772624 Mon Sep 17 00:00:00 2001 From: cabbage Date: Mon, 14 Sep 2026 06:53:49 +0000 Subject: [PATCH] fix: fail closed on unowned IPv6 listener --- test/rdp-access/rdp-access | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/rdp-access/rdp-access b/test/rdp-access/rdp-access index dc0ad27..c2bb475 100755 --- a/test/rdp-access/rdp-access +++ b/test/rdp-access/rdp-access @@ -198,6 +198,9 @@ start_ipv6_forward() { if ipv6_listener_active; then # Do not kill an unrelated listener. The operator can inspect it via # status; down only stops a PID that this helper started and verified. + if [ "$RDP_ACCESS_IPV6_FORWARD" = always ]; then + fail "IPv6 port $RDP_ACCESS_HTTP_PORT is already occupied by an unowned listener" + fi printf 'rdp-access: IPv6 port %s is already occupied; retaining the existing listener\n' \ "$RDP_ACCESS_HTTP_PORT" >&2 return 0