[Chilli] [PATCH] fix casts which turn out invalid under armv5tel

David Bird david at coova.com
Wed Jun 22 07:23:40 UTC 2011


Thanks... I will work in your changes and look for other examples of the
dereferencing. 

On Tue, 2011-06-21 at 12:23 +0200, Peter Warasin wrote:
> Hi list
> 
> With coova-chilli 1.2.6 compiled for armv5tel
> (run on marvell kirkwood Feroceon 88FR131)
> due to casting of type-punned variables to/from packed structs we get
> wrong values after the cast because the cast reads out wrong memory
> areas due to missing padding.
> Note, this happens only on arm due to its particular nature and
> necessity to have all structs aligned. With x86 this does not happen.
> 
> The attached patch fixes right now:
> - value of static ip supplied by radius is read correctly
> - chilli_query listip passes now correct value for ip address
> - chilli_query logout ip passes now correct value for ip address
> 
> I fear this happens on more places than these which actually happened to
> me and were the most obvious ones.
> I think every cast from/to packed struct needs to be handled this way.
> 
> What do you think?
> 
> peter
> 
> _______________________________________________
> Chilli mailing list
> Chilli at coova.org
> http://lists.coova.org/cgi-bin/mailman/listinfo/chilli




More information about the Chilli mailing list