summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorRyan Wagoner <rsw686@pfsense.org>2007-02-07 02:58:50 +0000
committerRyan Wagoner <rsw686@pfsense.org>2007-02-07 02:58:50 +0000
commit7fae6598b057bd8cc5a7043ef6fad4fab1d97709 (patch)
treedcabac69c79dafa20928f9dc7158bf85b0764f4e /usr
parentcecd86e05e7cbcf8359162cd10694b73bf3365c0 (diff)
downloadpfsense-7fae6598b057bd8cc5a7043ef6fad4fab1d97709.zip
pfsense-7fae6598b057bd8cc5a7043ef6fad4fab1d97709.tar.gz
correctly set the webgui url in miniupnpd
Diffstat (limited to 'usr')
-rw-r--r--usr/local/pkg/miniupnpd.inc14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr/local/pkg/miniupnpd.inc b/usr/local/pkg/miniupnpd.inc
index ca73dbb..f57787f 100644
--- a/usr/local/pkg/miniupnpd.inc
+++ b/usr/local/pkg/miniupnpd.inc
@@ -147,10 +147,12 @@
/* check that the interface has an ip address before adding parameters */
if($addr) {
$configtext .= "listening_ip={$addr}\n";
- if(!$ifaces_active)
+ if(!$ifaces_active) {
+ $webgui_ip = $addr;
$ifaces_active = $iface;
- else
+ } else {
$ifaces_active .= ", {$iface}";
+ }
} else {
upnp_warn("Interface {$iface} has no ip address, ignoring");
}
@@ -187,6 +189,14 @@
if(upnp_config('sysuptime'))
$configtext .= "system_uptime=yes\n";
+ /* set webgui url */
+ if($config['system']['webgui']['protocol']) {
+ $configtext .= "presentation_url=".$config['system']['webgui']['protocol']. "://{$webgui_ip}";
+ if($config['system']['webgui']['port'])
+ $configtext .= ":".$config['system']['webgui']['port'];
+ $configtext .= "/\n";
+ }
+
/* upnp access restrictions */
for($i=1; $i<=4; $i++) {
if(upnp_config("permuser{$i}"))
OpenPOWER on IntegriCloud