diff options
author | Ryan Wagoner <rsw686@pfsense.org> | 2007-02-07 02:48:56 +0000 |
---|---|---|
committer | Ryan Wagoner <rsw686@pfsense.org> | 2007-02-07 02:48:56 +0000 |
commit | 177fff3b97ef16f85dcdfb28e17982a15256ddd3 (patch) | |
tree | 8dd02ebfbd16119d9762393557000867c6e6bc07 | |
parent | 361a49efe6100bc705cfd0d53d09f45ca54842ec (diff) | |
download | pfsense-packages-177fff3b97ef16f85dcdfb28e17982a15256ddd3.tar.gz pfsense-packages-177fff3b97ef16f85dcdfb28e17982a15256ddd3.tar.bz2 pfsense-packages-177fff3b97ef16f85dcdfb28e17982a15256ddd3.zip |
correctly set the webgui url in miniupnpd
-rw-r--r-- | packages/miniupnpd/miniupnpd.inc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/packages/miniupnpd/miniupnpd.inc b/packages/miniupnpd/miniupnpd.inc index ca73dbb6..f57787fb 100644 --- a/packages/miniupnpd/miniupnpd.inc +++ b/packages/miniupnpd/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}")) |