Pedro Alves wrote:
[EMAIL PROTECTED] wrote:Hi, Why not just replace the lines *(struct ip_addr2 *)&sipaddr = hdr->sipaddr; *(struct ip_addr2 *)&dipaddr = hdr->dipaddr; with sipaddr = *(struct ip_addr *)&hdr->sipaddr; dipaddr = *(struct ip_addr *)&hdr->dipaddr;Because if hdr->sipaddr is unaligned and the architecture doesn't support unaligned accesses, like many RISCs do, the result is undefined.
Are you sure that it can become unaligned? There is code in place in lwip to guarantee header alignment... _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
