diff options
author | smos <seth.mos@dds.nl> | 2011-03-09 12:35:53 +0100 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2011-03-09 12:35:53 +0100 |
commit | 272c5d62061f23d60525df1ac6b69f966df6a5cc (patch) | |
tree | 4ba86187b59316687bbb08eea13836d8818efa05 /etc/inc/filter.inc | |
parent | a6917c659bdff1c44308d2055d5a3d3cd82400cc (diff) | |
download | pfsense-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.inc | 27 |
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; } |