mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-25 09:37:07 +08:00
Introduce LWIP_PACKED_CAST to fix error issue with ARMCC
ARMCC when using __packed structures will not implicitly convert a pointer to a member of a packed structure to something which does not have __packed. This results in a compiler error and was found with calls to icmp6_param_problem While there is a #pragma pack mode in ARMCC that disables this error, it does require existing ports to switch over their packing mode and perform integration
This commit is contained in:
@@ -976,7 +976,7 @@ netif_found:
|
||||
/* check payload length is multiple of 8 octets when mbit is set */
|
||||
if (IP6_FRAG_MBIT(frag_hdr) && (IP6H_PLEN(ip6hdr) & 0x7)) {
|
||||
/* ipv6 payload length is not multiple of 8 octets */
|
||||
icmp6_param_problem(p, ICMP6_PP_FIELD, &ip6hdr->_plen);
|
||||
icmp6_param_problem(p, ICMP6_PP_FIELD, LWIP_PACKED_CAST(const void *, &ip6hdr->_plen));
|
||||
LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with invalid payload length dropped\n"));
|
||||
pbuf_free(p);
|
||||
IP6_STATS_INC(ip6.drop);
|
||||
|
||||
Reference in New Issue
Block a user