]> Sergey Matveev's repositories - public-inbox.git/commitdiff
netd: setup TLS bits for well-known STARTTLS ports
authorEric Wong <e@80x24.org>
Wed, 20 Jul 2022 09:24:12 +0000 (09:24 +0000)
committerEric Wong <e@80x24.org>
Wed, 20 Jul 2022 16:52:12 +0000 (16:52 +0000)
Unfortunately, I can't think of an easy way to test this in
our test suite since binding these ports are privileged and
are often in use, anyways.

lib/PublicInbox/Daemon.pm

index fbce9154b52034e60ce78934c7941159b23a4379..bceae6e5699f5d13412f7cdc4e544074b58fd1d7 100644 (file)
@@ -208,7 +208,7 @@ EOF
                        $tls_opt{"$scheme://$sockname"} ||= accept_tls_opt('');
                } elsif (($scheme = $KNOWN_STARTTLS{$1})) {
                        $xnetd->{$sockname} = load_mod($scheme);
-                       next if $tls_opt{"$scheme://$sockname"};
+                       $tls_opt{"$scheme://$sockname"} ||= accept_tls_opt('');
                        $tls_opt{''} ||= accept_tls_opt('');
                }
        }