lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Possible alignment bug in 1.4.0?


From: address@hidden
Subject: Re: [lwip-users] Possible alignment bug in 1.4.0?
Date: Tue, 06 Mar 2012 18:12:51 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Mason wrote:
Krzysztof Wesołowski wrote:
[..]
Assumes that&ethhdr->dest is 32bit aligned, which is true only for
ETH_PAD_SIZE==0.
[..]
In principle, you're right. If one defines ETH_PAD_SIZE to 2
to align the IP header to 32 bits, then the first field of the
Ethernet header (MAC dest) cannot be aligned to 32 bits.

I agree. While the default implementation of ETHADDR32_COPY() wouldn't fail, it's still questionable if it should be used here (when ETH_PAD_SIZE is != 0, at least). I'd have to take a look at the other usages of that macro, though, to be sure how it should be used...

Simon



reply via email to

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