mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/upnp: replace obsolete find_interface_ip()
PR: https://github.com/opnsense/core/issues/4749
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
PLUGIN_NAME= upnp
|
||||
PLUGIN_VERSION= 1.4
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_REVISION= 2
|
||||
PLUGIN_DEPENDS= miniupnpd
|
||||
PLUGIN_COMMENT= Universal Plug and Play Service
|
||||
PLUGIN_MAINTAINER= franco@opnsense.org
|
||||
|
||||
@@ -148,9 +148,8 @@ function miniupnpd_configure_do($verbose = false)
|
||||
$if = get_real_interface($iface);
|
||||
/* above function returns iface if fail */
|
||||
if ($if != $iface) {
|
||||
$addr = find_interface_ip($if);
|
||||
/* check that the interface has an ip address before adding parameters */
|
||||
if (is_ipaddr($addr)) {
|
||||
list ($addr) = interfaces_primary_address($iface);
|
||||
if (!empty($addr)) {
|
||||
$config_text .= "listening_ip={$if}\n";
|
||||
if (!$ifaces_active) {
|
||||
$webgui_ip = $addr;
|
||||
|
||||
Reference in New Issue
Block a user