From 42d59a5da504e4e7f8914ae63968c1871ad33014 Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Mon, 19 Oct 2015 09:24:10 -0500 Subject: Fix the captive portal rules after 98bf4991dc31f97fc7315a6b8aba433de9d39cea. The malformed rules breaks the parsing of initialisation rules. Issue: #4746 --- src/etc/inc/captiveportal.inc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/etc/inc/captiveportal.inc b/src/etc/inc/captiveportal.inc index f6bbb64..59ca4ae 100644 --- a/src/etc/inc/captiveportal.inc +++ b/src/etc/inc/captiveportal.inc @@ -545,19 +545,13 @@ EOD; $rulenum++; $cprules .= "add {$rulenum} pass ip from table(100) to any out\n"; $rulenum++; - $ips = ""; - foreach ($cpips as $cpip) { + foreach ($cpips as $cpip) $cprules .= "table 100 add {$cpip}\n"; - } - $cprules .= "table 100 add 255.255.255.255\n"; - $cprules .= "add {$rulenum} pass ip from any to {$ips} in\n"; - $rulenum++; - $cprules .= "add {$rulenum} pass ip from {$ips} to any out\n"; + $cprules .= "add {$rulenum} pass ip from any to 255.255.255.255 in\n"; $rulenum++; - $cprules .= "add {$rulenum} pass icmp from {$ips} to any out icmptype 0\n"; - $rulenum++; - $cprules .= "add {$rulenum} pass icmp from any to {$ips} in icmptype 8 \n"; + $cprules .= "add {$rulenum} pass ip from 255.255.255.255 to any out\n"; $rulenum++; + /* Allowed ips */ $cprules .= "add {$rulenum} pipe tablearg ip from table(3) to any in\n"; $rulenum++; -- cgit v1.1