Captive portal LDAP Auth

  • I have upgraded 2 Alix boxes to 2.1 from 2.0.3 and both now throw this error when I go to Diagnostics -> Authentication:

    Fatal error: Cannot redeclare getNasIP() (previously declared in /usr/local/captiveportal/ in /etc/inc/ on line 1576

    Only one of these has captive portal enabled (testing LDAP auth), but both have the error.

    any ideas?

  • workaround:


    if (!function_exists('getNasIP')) { 

    in /etc/inc/ on line 1576

    and close the bracket '}' after the function.

  • Working if change an part the code existent for it:

    vi /etc/inc/

    if (!function_exists('getNasIP')) {
    /function getNasIP()

            global $config, $cpzone;

    if (empty($config['captiveportal'][$cpzone]['radiussrcip_attribute'])) {
                            $nasIp = get_interface_ip();
            } else {
                    if (is_ipaddr($config['captiveportal'][$cpzone]['radiussrcip_attribute']))
                            $nasIp = $config['captiveportal'][$cpzone]['radiussrcip_attribute'];
                            $nasIp = get_interface_ip($config['captiveportal'][$cpzone]['radiussrcip_attribute']);

                    $nasIp = "";

    return $nasIp;

Log in to reply