summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/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