Actions
Bug #5594
closedCaptive portal patch does not work anymore
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Squid
Target version:
-
Start date:
12/04/2015
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Affected Version:
2.2.x
Affected Plus Version:
Affected Architecture:
Description
Hi guys.
First thanks for your work !! pfSense is amazing.
---
I think that due to modifications in captiveportal.inc, the "patch captive portal" option does not works as expected.
links- captiveportal.inc -> https://github.com/pfsense/pfsense/blob/RELENG_2_2/etc/inc/captiveportal.inc
- squid.inc -> https://github.com/pfsense/pfsense-packages/blob/1ffd0c4e5b8a4f7e4d729b535397d59f4284d34e/config/squid3/34/squid.inc
- commit involved -> captiveportal.inc -> https://github.com/pfsense/pfsense/commit/98bf4991dc31f97fc7315a6b8aba433de9d39cea
squid.inc - portion of code which no longer works
foreach ($cp_inc as $line) {
$new_line = $line;
//remove applied squid patch
if (preg_match('/skipto 65314 ip/', $line)) {
$found_rule++;
$new_line = "";
}
if (preg_match('/255.255.255.255/', $line) && $squid_conf['patch_cp']) {
$found_rule++;
$new_line .= "\t" . '$cprules .= "add {$rulenum} skipto 65314 ip from any to {$ips} ' . $port . ' in\n";' . "\n";
$new_line .= "\t" . '$cprules .= "add {$rulenum} skipto 65314 ip from {$ips} ' . $port . ' to any out\n";' . "\n";
}
$new_cp_inc .= $new_line;
}
{$ips}no longer exists and should be replaced bytable(100)- In captiveportal.inc, there are permissive rules before the "skipto" rules added by the patch (lines 543 and 545). squid.inc should add "skipto" rules before these.
- In squid.inc,
preg_match('/255.255.255.255/' $line)(line 2018) matches twice. So the "skipto" rules are added twice - squid.inc should also increment
$rulenumafter each added rule
- 2.2.5-RELEASE (i386) nanobsd 4G
- Squid3 package v0.4.6
I hope that I give enough information. If not, ask me!
Files
Actions