diff options
-rw-r--r-- | packages/miniupnpd/miniupnpd.inc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/packages/miniupnpd/miniupnpd.inc b/packages/miniupnpd/miniupnpd.inc index 933e58cb..47736018 100644 --- a/packages/miniupnpd/miniupnpd.inc +++ b/packages/miniupnpd/miniupnpd.inc @@ -10,7 +10,18 @@ $ifaces_final = ""; $first = 0; $wanif = get_real_wan_interface(); - if(is_array($_POST['interface_array'])) { + + if($_POST['overridewanip']) + $overridewanip = $_POST['overridewanip']; + else if($config['installedpackages']['miniupnpd']['config'][0]['overridewanip']) + $overridewanip = $config['installedpackages']['miniupnpd']['config'][0]['overridewanip']; + + if(is_array($_POST['interface_array'])) + $interface_array = $_POST['interface_array']; + else if($config['installedpackages']['miniupnpd']['config'][0]['interface_array']) + $interface_array = $config['installedpackages']['miniupnpd']['config'][0]['interface_array']; + + if($interface_array) { foreach($_POST['interface_array'] as $iface) { $if = convert_friendly_interface_to_real_interface_name($iface); if($if) { @@ -29,7 +40,7 @@ $start .= "/usr/local/sbin/miniupnpd -p 2869{$ifaces_final}"; /* override wan ip address, common for carp, etc */ - if($_POST['overridewanip']) + if($overridewanip) $start .= " -o {$overridewanip}"; $stop .= "/usr/bin/killall miniupnpd \n"; |