Menu

Kick User Not Function

Help
2015-03-14
2015-03-16
  • Bruno D'Ambrosio

    Hi Mr Dirk.

    This Code for the kick user in Type "Coovachilli" not function with Nas static.Why? Problem?


    //__ Direct Connected Clients __
    $q_r = ClassRegistry::init('Na')->findByNasname($nas_ip);

        if($q_r){
    
            //Check the type
            $type = $q_r['Na']['type'];
            //======================================================================================
            //=======Different Types of NAS devices Require different type of disconnect actions====
            //======================================================================================
            if(($type == 'CoovaChilli-AP')|($type == 'CoovaChilli')){
    
                //Check the port of the device's COA
                $port   = $q_r['Na']['ports'];
                $secret = $q_r['Na']['secret'];
    
                //Send the NAS a POD packet
                //-------------------------------------------
                if($nas_ip == '0.0.0.0'){   //This is a hack for Chillispot since it reports 0.0.0.0
                    $nas_ip='127.0.0.1';
                }
                //Now we can attempt to disconnect the person
                $output = array();
                //Get the location of the radpod script
                // print("Disconnecting $username");
                //You may need to fine-tune the -t and -r switches - See man radclient for more detail
                $rc = $this->radclient;
    
                //Just send both to the device to be sure...
                //Coova wants the device to be UC
                $device_mac = strtoupper($device_mac);
                exec("echo \"User-Name = $device_mac\"  | $rc -r 2 -t 2 $nas_ip:$port 40 $secret",$output);
                exec("echo \"User-Name = $username\"    | $rc -r 2 -t 2 $nas_ip:$port 40 $secret",$output);
                //----------------------------------------------
            }
    

    Why Not Function, thanks.

     
  • Fabrizio Lazzaretti

    which type of NAS you are using ?

     
  • Bruno D'Ambrosio

    Coovachilli.

    With Coovachilli heartbeat function, why?

    Is a question to Nasip?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.