[Chilli] [Patch] Fix access_request() to conform with radius pack ID semantics
IT-Systemmanagement Pieter Hollants
pieter at hollants.com
Thu May 20 19:07:02 UTC 2010
Hi David,
now this got me really confused. But I still wasn't completely wrong.
Am 20.05.2010 07:24, schrieb David Bird:
> Hi Pieter,
> I had made some changes around that code... specifically, I don't
> believe your patch takes note of the situation where access_request()
> returns a Reject. This is why the following is done:
>
> int id;
> ...
> id = radius_pack.id;
> radius_pack.id = pack->id;
>
> ... possible radius_resp() with reject which needs id of req...
>
> appconn->radiusid = pack->id; // Noted so that later we can reply
> with correct id
> ...
> radius_pack.id = id;
>
> return radius_req(radius, &radius_pack, appconn);
I see the reason for overwriting radius_pack.id with pack->id. However,
it does not make sense to preserve radius_pack.id in "id", because, my
argument still holds true that an eventually called terminate_appconn()
inbetween already used the value in "id".
So, the first chunk in my patch was wrong, but the second chunk was
correct: radius_default_pack() _must_ be called after the call to
terminate_appconn() to get a new, valid ID.
--
Dipl.-Wirtsch.-Inform. Pieter Hollants
IT-Systemmanagement Pieter Hollants Tel. : (+49) (0)6192-910717
Rossertstraße 80 Fax : (+49) (0)6192-910713
65830 Kriftel eMail: pieter at hollants.com
More information about the Chilli
mailing list