net: ipv6: Remove in6_addr from packed net_ipv6_hdr struct
Replace unpacked in6_addr structures with raw buffers in net_ipv6_hdr struct, to prevent compiler warnings about unaligned access. Remove __packed parameter from `struct net_6lo_context` since the structure isn't really serialized. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
064200b420
commit
666e9f80d6
28 changed files with 403 additions and 317 deletions
|
@ -79,10 +79,10 @@ static int loopback_send(const struct device *dev, struct net_pkt *pkt)
|
|||
if (net_pkt_family(pkt) == AF_INET6) {
|
||||
struct in6_addr addr;
|
||||
|
||||
net_ipaddr_copy(&addr, &NET_IPV6_HDR(pkt)->src);
|
||||
net_ipaddr_copy(&NET_IPV6_HDR(pkt)->src,
|
||||
&NET_IPV6_HDR(pkt)->dst);
|
||||
net_ipaddr_copy(&NET_IPV6_HDR(pkt)->dst, &addr);
|
||||
net_ipv6_addr_copy_raw((uint8_t *)&addr, NET_IPV6_HDR(pkt)->src);
|
||||
net_ipv6_addr_copy_raw(NET_IPV6_HDR(pkt)->src,
|
||||
NET_IPV6_HDR(pkt)->dst);
|
||||
net_ipv6_addr_copy_raw(NET_IPV6_HDR(pkt)->dst, (uint8_t *)&addr);
|
||||
} else {
|
||||
struct in_addr addr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue