[ previous ] [ next ] [ threads ]
 
 From:  Manuel Kasper <mk at neon1 dot net>
 To:  Jonathan De Graeve <Jonathan dot De dot Graeve at imelda dot be>
 Cc:  m0n0wall dash dev at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall-dev] RADIUS question
 Date:  Tue, 08 Nov 2005 23:41:04 +0100
On 08.11.05 17:36 +0100, Jonathan De Graeve wrote:

> Does anyone knows why there's $clientip instead of $cpdb[$i][2] in
> this piece of code?
> 
>        /* find an existing entry and delete it */
>         for ($i = 0; $i < count($cpdb); $i++) {
>                 if(!strcasecmp($cpdb[$i][2],$clientip)) {
>  
> ...
> $clientip, <=== Why do we use the new ip instead of the previous one
> recorded in the database. IMHO this breaks the radius accounting
> since the stop will be with the new ip instead of the recorded ip.

strcasecmp() only returns 0 if the two strings are equal, so it
doesn't matter whether we use $cpdb[$i][2] or $clientip.

- Manuel