net/upnp: coding style and version bump

This commit is contained in:
Franco Fichtner 2026-03-04 09:40:12 +01:00
parent 6c81f6d085
commit e05c8ee1da
3 changed files with 10 additions and 7 deletions

View file

@ -1,5 +1,5 @@
PLUGIN_NAME= upnp
PLUGIN_VERSION= 1.9.d
PLUGIN_VERSION= 1.9
PLUGIN_DEPENDS= miniupnpd
PLUGIN_COMMENT= UPnP IGD & PCP/NAT-PMP Service
PLUGIN_MAINTAINER= franco@opnsense.org

View file

@ -14,6 +14,8 @@ Plugin Changelog
* Impove help/wording and update missed changelog
* Add daemon patch to improve logging
(all contributed by Self-Hosting-Group)
1.8
* New UI options: disable IPv6 mapping, allow third-party mapping, UPnP IGD compatibility, router/friendly name; remove option: report system uptime (bug)
@ -21,7 +23,7 @@ Plugin Changelog
* New UI sections, rewording plugin, set allow-filtered with STUN to workaround CGNAT test limitation, clean up daemon config
* Update daemon to 2.3.9, add build options (e.g. IGDv2 support), add daemon patch to improve UPnP IGDv2 compatibility
(1.8/1.9 contributed by Self-Hosting-Group)
(all contributed by Self-Hosting-Group)
1.7

View file

@ -84,17 +84,18 @@ function miniupnpd_start()
return;
}
$log_level = $config['installedpackages']['miniupnpd']['config'][0]['log_level'] ?? '';
$cmd_frmt = ['/usr/local/sbin/miniupnpd -f %s -P %s'];
$cmd_args = ['/var/etc/miniupnpd.conf', '/var/run/miniupnpd.pid'];
switch ($log_level) {
switch ($config['installedpackages']['miniupnpd']['config'][0]['log_level'] ?? '') {
case 'debug':
$cmd_frmt[] = '-vv';
break;
case 'info':
$cmd_frmt[] = '-v';
break;
case 'debug':
$cmd_frmt[] = '-vv';
default:
break;
}
mwexecfb($cmd_frmt, $cmd_args);