aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/miniupnpd/miniupnpd.inc16
-rw-r--r--packages/miniupnpd/miniupnpd.xml7
-rwxr-xr-xpackages/miniupnpd/sbin/miniupnpdbin0 -> 47238 bytes
3 files changed, 18 insertions, 5 deletions
diff --git a/packages/miniupnpd/miniupnpd.inc b/packages/miniupnpd/miniupnpd.inc
index 06b1d8ea..e4d02402 100644
--- a/packages/miniupnpd/miniupnpd.inc
+++ b/packages/miniupnpd/miniupnpd.inc
@@ -20,14 +20,22 @@
$ifaces_final .= " -i {$wanif} -a {$addr}";
$first = 1;
} else {
- log_error("Could not resolve real interfaec {$iface}");
+ log_error("Could not resolve real interface {$iface}");
}
}
- $start = "/usr/local/sbin/miniupnpd -p 2869{$ifaces_final}";
+ $start = "# Clear existing rules and rdr entries \n";
+ $start .= "/sbin/pfctl -aminiupnpd -Fr 2>&1 >/dev/null\n";
+ $start .= "/sbin/pfctl -aminiupnpd -Fn 2>&1 >/dev/null\n";
+ $start .= "/usr/local/sbin/miniupnpd -p 2869{$ifaces_final}";
+
+ $stop .= "/usr/bin/killall miniupnpd \n";
+ $stop .= "# Clear existing rules and rdr entries \n";
+ $stop .= "/sbin/pfctl -aminiupnpd -Fr 2>&1 >/dev/null\n";
+ $stop .= "/sbin/pfctl -aminiupnpd -Fn 2>&1 >/dev/null\n";
write_rcfile(array(
"file" => "miniupnpd.sh",
"start" => $start,
- "stop" => "/usr/bin/killall miniupnpd"
+ "stop" => $stop
)
);
}
@@ -36,4 +44,4 @@
config_unlock();
conf_mount_ro();
}
-?> \ No newline at end of file
+?>
diff --git a/packages/miniupnpd/miniupnpd.xml b/packages/miniupnpd/miniupnpd.xml
index 5509a5e8..6140e256 100644
--- a/packages/miniupnpd/miniupnpd.xml
+++ b/packages/miniupnpd/miniupnpd.xml
@@ -27,6 +27,11 @@
<prefix>/usr/local/www/</prefix>
<chmod>0777</chmod>
</additional_files_needed>
+ <additional_files_needed>
+ <prefix>/usr/local/sbin/</prefix>
+ <chmod>0755</chmod>
+ <item>http://www.pfsense.com/packages/config/miniupnpd/sbin/miniupnpd</item>
+ </additional_files_needed>
<service>
<name>miniupnpd</name>
<rcfile>miniupnpd.sh</rcfile>
@@ -66,4 +71,4 @@
<custom_php_deinstall_command>
exec("rm /usr/local/etc/rc.d/miniupnpd*");
</custom_php_deinstall_command>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/packages/miniupnpd/sbin/miniupnpd b/packages/miniupnpd/sbin/miniupnpd
new file mode 100755
index 00000000..0b7b361b
--- /dev/null
+++ b/packages/miniupnpd/sbin/miniupnpd
Binary files differ