Why add new empty line to captiveportal.inc …...



  • Hi guys

    I use captiveportal and freeradius on mysql database for accounting.
    My problem is that add blank lines in line 525 of /etc/inc/captiveportal.inc file so that after a week exist thousands empty line between line 525 and 526.
    when this happen, the captiveportal update packets that contain the user connection information don't recieve and in this case  traffic of users limitation not compute and idle-timeout , … not apply.

    if i delete these lines, save the file and restart captiveportal service all things back to normal case.

    Can i find how to add these lines and by what file or program these lines add to captiveportal.inc file?

    Thanks for your help, my friends.



  • @new_in_pf:

    …..
    Can i find how to add these lines and by what file or program these lines add to captiveportal.inc file?

    Line 525 :  https://github.com/pfsense/pfsense/blob/master/etc/inc/captiveportal.inc#L525

    pfSense doesn't auto-modify this file.

    You setup is plain broke / not original / has strange rogue packages / has been hacked.

    Reinstall - and use only basic settings, no hacks, no non-stable packages.

    You could even declare /etc/inc/captiveportal.inc as read only, but remember to undo this when doing auto updates.


  • Rebel Alliance Developer Netgate

    The squid 3.x package alters that file, which it really should not be doing.



  • I am using pfsense 2.1, squid3-dev with transparent mode and captiveportal

    when i enable  transparent mode of squid, these empty lines added to file, even i get any permission of capticeportal.inc file but this will continue to add empty lines.

    I attach the normal captiveportal file and with squid captiveportal.inc.

    In the file captiveportal-squid.inc add empty lines after line 525.

    thanks for your time.

    captiveportal-squid.txt
    captiveportal.txt


  • Banned

    Yeah, stop using the Squid patch.@new_in_pf:

    when i enable  transparent mode of squid, these empty lines added to file, even i get any permission of capticeportal.inc file but this will continue to add empty lines.

    Yeah, stop enabling that with CP.

    https://redmine.pfsense.org/issues/4583



  • for prevention of stop sending update packets by captiveportal find a page in pfsense forum :

    https://forum.pfsense.org/index.php?topic=83279.msg456463#msg456463

    I add this cron to run /etc/rc.prunecaptiveportal zone_name  every minute

    */1 * * * * root /etc/rc.prunecaptiveportal zone_name

    and now it work correctly.

    Is there any problem for use from this?



  • @new_in_pf:

    for prevention of stop sending update packets by captiveportal find a page in pfsense forum :
    https://forum.pfsense.org/index.php?topic=83279.msg456463#msg456463

    This was a problem with an ancient version of pfSEnse.
    Upgrade to a recent version and problem is solved.
    Do NOT keep old pfSense versions. Think about the huge security issues …

    @new_in_pf:

    I add this cron to run /etc/rc.prunecaptiveportal zone_name  every minute
    */1 * * * * root /etc/rc.prunecaptiveportal zone_name
    and now it work correctly.

    When you activate a portal zone, for every zone, a cron is already run every 1 minute.
    Why doubling it ?

    Enter SSH, and type
    ps ax | grep 'cron'
    and you will see it.

    NOTE: old pfSense version had the problem that these cron's would die … Just update, and problem is solved.

    @new_in_pf:

    Is there any problem for use from this?

    Yes, The one launched by the pfSEnse will also run, and your instance will lockout the pfSense 'cron' (or the other way around). Parsing all clients can take seconds, or even more.
    The final result will be: no one gets disconnected.


  • Banned

    @doktornotor:

    Yeah, stop using the Squid patch.@new_in_pf:

    when i enable  transparent mode of squid, these empty lines added to file, even i get any permission of capticeportal.inc file but this will continue to add empty lines.

    Yeah, stop enabling that with CP.

    https://redmine.pfsense.org/issues/4583

    Now with PR to remove the "feature" and hopefully fix the screwed code. https://github.com/pfsense/pfsense-packages/pull/904


Log in to reply