lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] LCP fails to negotiate options continuously after many


From: Sylvain Rochet
Subject: Re: [lwip-users] LCP fails to negotiate options continuously after many previous successes
Date: Sun, 18 May 2014 14:02:28 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]