net: ipv6: network protocol structures should be packed
authorEhsan Mohandesi <emohandesi@linux.microsoft.com>
Thu, 18 May 2023 18:24:39 +0000 (11:24 -0700)
committerTom Rini <trini@konsulko.com>
Thu, 27 Jul 2023 17:39:07 +0000 (13:39 -0400)
The structure icmp6_ra_prefix_info needs to be packed because it is read
from a network stream.

Signed-off-by: Ehsan Mohandesi <emohandesi@linux.microsoft.com>
Reviewed-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
include/net6.h

index beafc05..1e766aa 100644 (file)
@@ -204,7 +204,7 @@ struct icmp6_ra_prefix_info {
         * be initialized to zero by the sender and ignored by the receiver.
         */
        struct in6_addr prefix;
-};
+} __packed;
 
 extern struct in6_addr const net_null_addr_ip6;        /* NULL IPv6 address */
 extern struct in6_addr net_gateway6;   /* Our gateways IPv6 address */