Skip to content

Commit

Permalink
net/upnp: replace obsolete find_interface_ip()
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Sep 15, 2021
1 parent 0c756bb commit 55b6200
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion net/upnp/Makefile
Original file line number Diff line number Diff line change
@@ -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= [email protected]
Expand Down
5 changes: 2 additions & 3 deletions net/upnp/src/etc/inc/plugins.inc.d/miniupnpd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 55b6200

Please sign in to comment.