Hello Andrew,

On Sun, May 18, 2014 at 07:36:06AM -0400, Andrew Westberg wrote:
> It's been running for over 15 hours on ppp_new without issue. I'd say the
> issue is solved.

Yeah!, happy to hear that.


> There may still be a bug in ppp.c with these two lines around 1762 if the
> platform isn't/can't support packed structs.
> 
>               *(payload++) = pcrx->in_protocol >> 8;
>               *(payload) = pcrx->in_protocol & 0xFF;
> 
> In the old ppp, these fields are set by fields after first casting to a
> header struct so packed or not makes no difference.

I have to disagree. byte access is the only way to escape from alignment 
issues, this is what your compiler do for packed struct if your target 
does not support unaligned access for short and long.

This is why all structures that are going to be used in buffers are 
packed in lwIP, because the structure might be set to an unaligned 
address in the buffer.

Anyway, lwIP is not designed to work with compilers that does not 
support packed structures.


> Thanks for all your help!

You're welcome :)


Sylvain

Attachment: signature.asc
Description: Digital signature

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to