summaryrefslogtreecommitdiffstats
path: root/src/usr/local/pkg
diff options
context:
space:
mode:
authorJosh Galvez (zevlag) <josh@zevlag.com>2016-03-11 17:03:45 -0700
committerChris Buechler <cmb@pfsense.org>2016-06-30 01:11:04 -0500
commitdc2db4dcc061211dcb404bbf777539264ef105ca (patch)
tree45aac6f39b322696ec4a74517b3f5fcad57e0009 /src/usr/local/pkg
parentabbd41504f21fa390bae54458156f92f8f683933 (diff)
downloadpfsense-dc2db4dcc061211dcb404bbf777539264ef105ca.zip
pfsense-dc2db4dcc061211dcb404bbf777539264ef105ca.tar.gz
Make model_number customizable
Diffstat (limited to 'src/usr/local/pkg')
-rw-r--r--src/usr/local/pkg/miniupnpd.inc7
-rw-r--r--src/usr/local/pkg/miniupnpd.xml6
2 files changed, 11 insertions, 2 deletions
diff --git a/src/usr/local/pkg/miniupnpd.inc b/src/usr/local/pkg/miniupnpd.inc
index 4a132dd..b2d8b71 100644
--- a/src/usr/local/pkg/miniupnpd.inc
+++ b/src/usr/local/pkg/miniupnpd.inc
@@ -243,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 6271b91..a0bbd37 100644
--- a/src/usr/local/pkg/miniupnpd.xml
+++ b/src/usr/local/pkg/miniupnpd.xml
@@ -133,6 +133,12 @@
<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