Arran Cudbard-Bell <[email protected]> writes:
> On 23 Aug 2011, at 09:52, tohaikmeng wrote:
>>
>> What do you mean by parameter parsing?
>
> This:
>
> radmin> del client ipaddr 192.168.168.111
> ERROR: Must specify <ipaddr>
> radmin> del client ipaddr <ipaddr> 192.168.168.111
>
> Obviously the first form you used is correct, the fact that it needs <ipaddr>
> is the bug...
So trivial to fix that I just sent a pull request.
> If radmin says it can only delete dynamic clients, then it can only
> delete dynamic clients. Clients read from a clients.conf file are not
> dynamic, they are static. Dynamic clients are those added dynamically
> by the dynamic client virtual server, look in raddb/sites-available
> for examples.
And looking at the "del client" code, you have the explanation why this
matters in a comment:
if (!client->dynamic) {
cprintf(listener, "ERROR: Client %s was not dynamically
defined.\n", argv[1]);
return 0;
}
/*
* DON'T delete it. Instead, mark it as "dead now". The
* next time we receive a packet for the client, it will
* be deleted.
*
* If we don't receive a packet from it, the client
* structure will stick around for a while. Oh well...
*/
client->lifetime = 1;
So the clients aren't really deleted. The code just marks it dead and
leaves deletion to the automatic dead client reaping in the dynamic
client implementation.
Bjørn
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html