summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-06-30 01:10:40 -0500
committerChris Buechler <cmb@pfsense.org>2016-06-30 01:10:40 -0500
commit0015e84cf423879efcab89321c5f217dae0a9fb0 (patch)
tree59d4ef3020ce9842157f311acf3fa4eaac5d7635
parentd691888e596d1982d468e17602fff3162d6cb6ea (diff)
parent0748e493e25bf209aa7cd0e5dab532e13892d4dd (diff)
downloadpfsense-0015e84cf423879efcab89321c5f217dae0a9fb0.zip
pfsense-0015e84cf423879efcab89321c5f217dae0a9fb0.tar.gz
Merge pull request #2729 from zevlag/BountyRequestTopic106193
-rw-r--r--src/usr/local/pkg/miniupnpd.inc11
-rw-r--r--src/usr/local/pkg/miniupnpd.xml12
2 files changed, 20 insertions, 3 deletions
diff --git a/src/usr/local/pkg/miniupnpd.inc b/src/usr/local/pkg/miniupnpd.inc
index ecf187b..13248b5 100644
--- a/src/usr/local/pkg/miniupnpd.inc
+++ b/src/usr/local/pkg/miniupnpd.inc
@@ -228,7 +228,9 @@
$config_text .= "secure_mode=yes\n";
/* set webgui url */
- if (!empty($config['system']['webgui']['protocol'])) {
+ if (!empty($upnp_config['presentationurl'])){
+ $config_text .= "presentation_url=" . $upnp_config['presentationurl'] . "\n";
+ } elseif (!empty($config['system']['webgui']['protocol'])) {
$config_text .= "presentation_url={$config['system']['webgui']['protocol']}://{$webgui_ip}";
if (!empty($config['system']['webgui']['port'])) {
$config_text .= ":{$config['system']['webgui']['port']}";
@@ -241,8 +243,11 @@
$config_text .= "serial=".strtoupper(substr(upnp_uuid(), 0, 8))."\n";
/* set model number */
- $config_text .= "model_number=" . $g['product_version'] . "\n";
-
+ if (!empty($upnp_config['modelnumber'])){
+ $config_text .= "model_number=" . $upnp_config['modelnumber'] . "\n";
+ } else {
+ $config_text .= "model_number=" . $g['product_version'] . "\n";
+ }
/* upnp access restrictions */
if (is_array($upnp_config['row'])) {
foreach ($upnp_config['row'] as $row) {
diff --git a/src/usr/local/pkg/miniupnpd.xml b/src/usr/local/pkg/miniupnpd.xml
index 80034ea..a0bbd37 100644
--- a/src/usr/local/pkg/miniupnpd.xml
+++ b/src/usr/local/pkg/miniupnpd.xml
@@ -127,6 +127,18 @@
</rowhelperfield>
</rowhelper>
</field>
+ <field>
+ <fielddescr>Custom presentation URL</fielddescr>
+ <fieldname>presentationurl</fieldname>
+ <type>input</type>
+ <description>If left blank the default value of the WebGUI of this firewall will be used.</description>
+ </field>
+ <field>
+ <fielddescr>Custom model number</fielddescr>
+ <fieldname>modelnumber</fieldname>
+ <type>input</type>
+ <description>If left blank the default value of the firmware version of pfSense will be used.</description>
+ </field>
</fields>
<custom_php_command_before_form>
before_form_miniupnpd($pkg);
OpenPOWER on IntegriCloud