From 38c9ab74b46f0e489ae3dee04bb7609e0a78899c Mon Sep 17 00:00:00 2001 From: Denny Page Date: Tue, 7 Jan 2025 10:59:37 -0800 Subject: [PATCH] If both IPv4 and IPv6 server listen are enabled, the IPv4 address will not work. While the current version of ntopng accepts a list for listen address, it only uses the last element in the list. This means that both an IPv4 and IPv6 listen address cannot be provided at the same time. Hopefully this will be fixed upstream at some point in the future. Until then, we limit the listen selection to one protocol. Additionally, bracket the address for IPv6. --- net/pfSense-pkg-ntopng/Makefile | 3 +-- net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc | 4 ++-- net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.xml | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/net/pfSense-pkg-ntopng/Makefile b/net/pfSense-pkg-ntopng/Makefile index 8253bf79b783..12458138ac12 100644 --- a/net/pfSense-pkg-ntopng/Makefile +++ b/net/pfSense-pkg-ntopng/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= pfSense-pkg-ntopng -PORTVERSION= 5.6.0 -PORTREVISION= 1 +PORTVERSION= 6.2.0 CATEGORIES= net MASTER_SITES= # empty DISTFILES= # empty diff --git a/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc b/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc index a0870e3a4ec1..2e6d62401efa 100644 --- a/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc +++ b/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.inc @@ -171,13 +171,13 @@ function ntopng_sync_package() { } } } - if (config_get_path('installedpackages/ntopng/config/0/server_ipv6') == "on") { + elseif (config_get_path('installedpackages/ntopng/config/0/server_ipv6') == "on") { if ($iface == "All") { $listen_array[] = "[::]:" . HTTP_PORT; } else { $addr = get_interface_ipv6($iface); if (is_ipaddrv6($addr)) { - $listen_array[] = "{$addr}:" . HTTP_PORT; + $listen_array[] = "[{$addr}]:" . HTTP_PORT; } } } diff --git a/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.xml b/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.xml index fed3c9f192e3..83528b493b36 100644 --- a/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.xml +++ b/net/pfSense-pkg-ntopng/files/usr/local/pkg/ntopng.xml @@ -127,7 +127,7 @@ on @@ -137,7 +137,7 @@ checkbox