[Chilli] [PATCH] fix casts which turn out invalid under armv5tel
Peter Warasin
peter at endian.com
Tue Jun 21 10:23:43 UTC 2011
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
--
:: e n d i a n
:: open source - open minds
:: peter warasin
:: http://www.endian.com :: peter at endian.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coova-chilli-1.2.6-fix-invalid-cast-on-arm.patch
Type: text/x-patch
Size: 3225 bytes
Desc: not available
URL: <http://lists.coova.org/pipermail/chilli/attachments/20110621/5638d788/attachment.bin>
More information about the Chilli
mailing list