Project

General

Profile

Actions

Bug #5594

closed

Captive portal patch does not work anymore

Added by Laurent Legendre almost 9 years ago. Updated almost 8 years ago.

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

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 by table(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 $rulenum after each added rule
tested platform:
  • 2.2.5-RELEASE (i386) nanobsd 4G
  • Squid3 package v0.4.6

I hope that I give enough information. If not, ask me!


Files

captive_portal_patch.PNG (58.5 KB) captive_portal_patch.PNG Marcello Silva Coutinho, 12/09/2015 03:32 PM
Actions

Also available in: Atom PDF