summaryrefslogtreecommitdiffstats
path: root/etc/inc/filter.inc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2011-03-09 12:35:53 +0100
committersmos <seth.mos@dds.nl>2011-03-09 12:35:53 +0100
commit272c5d62061f23d60525df1ac6b69f966df6a5cc (patch)
tree4ba86187b59316687bbb08eea13836d8818efa05 /etc/inc/filter.inc
parenta6917c659bdff1c44308d2055d5a3d3cd82400cc (diff)
downloadpfsense-272c5d62061f23d60525df1ac6b69f966df6a5cc.zip
pfsense-272c5d62061f23d60525df1ac6b69f966df6a5cc.tar.gz
Automatically add a multicast allow rule for miniupnpd so that the Xbox 360 works.
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r--etc/inc/filter.inc27
1 files changed, 27 insertions, 0 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index bcbe3ec..1cebbd3 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -2352,10 +2352,37 @@ EOD;
$ipfrules .= <<<EOD
anchor "tftp-proxy/*"
+EOD;
+
+ update_filter_reload_status("Creating uPNP rules...");
+ if(isset($config['installedpackages']['miniupnpd']['config'][0]['enable'])) {
+
+ $ipfrules .= <<<EOD
# uPnPd
anchor "miniupnpd"
EOD;
+
+ $upnp_interfaces = explode(",", $config['installedpackages']['miniupnpd']['config']['iface_array']);
+ foreach($upnp_interfaces as $upnp_if) {
+ if(is_array($FilterIflist[$upnp_if])) {
+ $oc = $FilterIflist[$upnp_if];
+ if($oc['ip']) {
+ $sa = $oc['sa'];
+ $sn = $oc['sn'];
+ $if = $oc['if'];
+ }
+ if($sa) {
+ $ipfrules .= <<<EOD
+
+pass in quick on \${$oc['descr']} proto tcp from {$sa}/{$sn} to 239.255.255.250/32 port 1900 flags any keep state label "pass multicast traffic to miniupnpd"
+
+EOD;
+ }
+ }
+ }
+ }
+
return $ipfrules;
}
OpenPOWER on IntegriCloud