aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/miniupnpd/miniupnpd.inc27
-rw-r--r--packages/miniupnpd/miniupnpd.xml2
-rwxr-xr-xpackages/miniupnpd/sbin/miniupnpdbin51744 -> 51851 bytes
-rw-r--r--pkg_config.xml2
4 files changed, 22 insertions, 9 deletions
diff --git a/packages/miniupnpd/miniupnpd.inc b/packages/miniupnpd/miniupnpd.inc
index f57787fb..5cda1ae0 100644
--- a/packages/miniupnpd/miniupnpd.inc
+++ b/packages/miniupnpd/miniupnpd.inc
@@ -18,16 +18,14 @@
function upnp_running () {
if((int)exec("pgrep miniupnpd | wc -l") > 0)
return true;
- else
- return false;
+ return false;
}
function upnp_config ($name) {
global $config;
if($config['installedpackages']['miniupnpd']['config'][0]["{$name}"])
return $config['installedpackages']['miniupnpd']['config'][0]["{$name}"];
- else
- return NULL;
+ return NULL;
}
function upnp_write_config($conf_file, $conf_text) {
@@ -38,7 +36,15 @@
}
fwrite($conf, $conf_text);
fclose($conf);
- }
+ }
+
+ function upnp_uuid() {
+ /* md5 hash of wan mac */
+ $arp = explode(' ',exec('arp -an -i '.get_real_wan_interface()));
+ $uuid = md5($arp[3]);
+ /* put uuid in correct format 8-4-4-4-12 */
+ return substr($uuid,0,8)."-".substr($uuid,9,4)."-".substr($uuid,13,4)."-".substr($uuid,17,4)."-".substr($uuid,21,12);
+ }
function upnp_validate_ip($ip,$check_cdir) {
/* validate cdir */
@@ -128,7 +134,7 @@
global $config;
global $input_errors;
- config_lock();
+ config_lock();
$configtext = "ext_ifname=".get_real_wan_interface()."\n";
$configtext .= "port=2189\n";
@@ -191,11 +197,18 @@
/* set webgui url */
if($config['system']['webgui']['protocol']) {
- $configtext .= "presentation_url=".$config['system']['webgui']['protocol']. "://{$webgui_ip}";
+ $configtext .= "presentation_url=".$config['system']['webgui']['protocol']."://{$webgui_ip}";
if($config['system']['webgui']['port'])
$configtext .= ":".$config['system']['webgui']['port'];
$configtext .= "/\n";
}
+
+ /* set uuid and serial */
+ $configtext .= "uuid=".upnp_uuid()."\n";
+ $configtext .= "serial=".strtoupper(substr(upnp_uuid(),0,8))."\n";
+
+ /* set model number */
+ $configtext .= "model_number=".exec("cat /etc/version")."\n";
/* upnp access restrictions */
for($i=1; $i<=4; $i++) {
diff --git a/packages/miniupnpd/miniupnpd.xml b/packages/miniupnpd/miniupnpd.xml
index 79d56e13..db008b70 100644
--- a/packages/miniupnpd/miniupnpd.xml
+++ b/packages/miniupnpd/miniupnpd.xml
@@ -2,7 +2,7 @@
<packagegui>
<title>Services: MiniUPnPd</title>
<name>miniupnpd</name>
- <version>20070130</version>
+ <version>20070208</version>
<savetext>Change</savetext>
<include_file>/usr/local/pkg/miniupnpd.inc</include_file>
<aftersaveredirect>status_upnp.php</aftersaveredirect>
diff --git a/packages/miniupnpd/sbin/miniupnpd b/packages/miniupnpd/sbin/miniupnpd
index 977bb604..08397b89 100755
--- a/packages/miniupnpd/sbin/miniupnpd
+++ b/packages/miniupnpd/sbin/miniupnpd
Binary files differ
diff --git a/pkg_config.xml b/pkg_config.xml
index 74c20849..3cdb026c 100644
--- a/pkg_config.xml
+++ b/pkg_config.xml
@@ -160,7 +160,7 @@
<website>http://miniupnp.free.fr/</website>
<category>Network Management</category>
<maintainer>seth.mos@xs4all.nl ryan@wgnrs.dynu.com</maintainer>
- <version>20070130</version>
+ <version>20070208</version>
<required_version>1.0</required_version>
<status>Stable</status>
<config_file>http://www.pfsense.com/packages/config/miniupnpd/miniupnpd.xml</config_file>