Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Jan 2024 04:58:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 276213] net-mgt/unifi7: explicitly disable preferIPv4Stack
Message-ID:  <bug-276213-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276213

            Bug ID: 276213
           Summary: net-mgt/unifi7: explicitly disable preferIPv4Stack
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: hugo@slabnet.com

I'm running unifi7 on an opnsense 23.7.11 box, based on FreeBSD 13.2 with
unifi7 version 7.5.187_1.

The system is fully dual stack, but out of the box the java processes for t=
he
unifi7 application (web UI and such) appear to bind only to IPv4.

I've confirmed that explicitly toggling java.net.preferIPv4Stack in
/usr/local/etc/rc.d/unifi to 'false' permits the application to bind to bot=
h v4
and v6 (tcp46 bind). The java docs at
https://docs.oracle.com/javase%2F7%2Fdocs%2Fapi%2F%2F/java/net/doc-files/ne=
t-properties.html
indicate that this setting *should* be 'false' by default, but in an
out-of-the-box setup it definitely was only listening on v4 for me.

I don't have another system to validate this on at the moment, but if it *i=
s*
binding on v4 by default, could we toss an explicit
'-Djava.net.preferIPv4Stack=3Dfalse' in the rc script to permit a dual AF b=
ind by
default?

e.g.:

$ diff -u unifi unifi_afbind
--- unifi       2024-01-07 18:27:14
+++ unifi_afbind        2024-01-07 18:27:07
@@ -46,6 +46,7 @@
 : ${unifi_chdir=3D/usr/local/share/java/unifi}
 : ${unifi_java_home=3D/usr/local/openjdk17}
 : ${unifi_javaflags=3D"-Djava.awt.headless=3Dtrue -Xmx1024M \
+       -Djava.net.preferIPv4Stack=3Dfalse \
        --add-opens java.base/java.lang=3DALL-UNNAMED \
        --add-opens java.base/java.time=3DALL-UNNAMED \
        --add-opens java.base/sun.security.util=3DALL-UNNAMED \

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276213-7788>