mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/upnp: time to stop using get_interface_ip() in plugins
The function is opportunistic and has weird VIP glue which is not needed in 98% of the code.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
PLUGIN_NAME= upnp
|
||||
PLUGIN_VERSION= 1.5
|
||||
PLUGIN_REVISION= 3
|
||||
PLUGIN_REVISION= 4
|
||||
PLUGIN_DEPENDS= miniupnpd
|
||||
PLUGIN_COMMENT= Universal Plug and Play Service
|
||||
PLUGIN_MAINTAINER= franco@opnsense.org
|
||||
|
||||
@@ -146,7 +146,7 @@ function miniupnpd_configure_do($verbose = false)
|
||||
$if = get_real_interface($iface);
|
||||
/* above function returns iface if fail */
|
||||
if ($if != $iface) {
|
||||
$addr = get_interface_ip($iface);
|
||||
list ($addr) = interfaces_primary_address($iface);
|
||||
if (!empty($addr)) {
|
||||
$config_text .= "listening_ip={$if}";
|
||||
if (!empty($upnp_config['overridesubnet'])) {
|
||||
|
||||
Reference in New Issue
Block a user