--- zzzz-none-000/linux-4.4.271/net/core/secure_seq.c 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/net/core/secure_seq.c 2023-01-11 09:25:44.000000000 +0000 @@ -46,11 +46,12 @@ u32 secret[MD5_MESSAGE_BYTES / 4]; u32 hash[MD5_DIGEST_WORDS]; u32 i; + const struct in6_addr *daddr6 = (struct in6_addr *) daddr; net_secret_init(); memcpy(hash, saddr, 16); for (i = 0; i < 4; i++) - secret[i] = net_secret[i] + (__force u32)daddr[i]; + secret[i] = net_secret[i] + (__force u32)daddr6->s6_addr32[i]; secret[4] = net_secret[4] + (((__force u16)sport << 16) + (__force u16)dport); for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++) @@ -68,11 +69,12 @@ u32 secret[MD5_MESSAGE_BYTES / 4]; u32 hash[MD5_DIGEST_WORDS]; u32 i; + const struct in6_addr *daddr6 = (struct in6_addr *) daddr; net_secret_init(); memcpy(hash, saddr, 16); for (i = 0; i < 4; i++) - secret[i] = net_secret[i] + (__force u32) daddr[i]; + secret[i] = net_secret[i] + (__force u32) daddr6->s6_addr32[i]; secret[4] = net_secret[4] + (__force u32)dport; for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++) secret[i] = net_secret[i]; @@ -146,6 +148,7 @@ u64 secure_dccpv6_sequence_number(__be32 *saddr, __be32 *daddr, __be16 sport, __be16 dport) { + const struct in6_addr *daddr6 = (struct in6_addr *) daddr; u32 secret[MD5_MESSAGE_BYTES / 4]; u32 hash[MD5_DIGEST_WORDS]; u64 seq; @@ -154,7 +157,7 @@ net_secret_init(); memcpy(hash, saddr, 16); for (i = 0; i < 4; i++) - secret[i] = net_secret[i] + (__force u32)daddr[i]; + secret[i] = net_secret[i] + (__force u32)daddr6->s6_addr32[i]; secret[4] = net_secret[4] + (((__force u16)sport << 16) + (__force u16)dport); for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++)