tcp: fix tcp_fastopen unaligned access complaints on sparc
[firefly-linux-kernel-4.4.55.git] / include / linux / tcp.h
index b386361ba3e87226c329924bc1992252fcf0b9d6..318c24612458d61624a8923f524d292aab8ea0f4 100644 (file)
@@ -56,8 +56,13 @@ static inline unsigned int tcp_optlen(const struct sk_buff *skb)
 
 /* TCP Fast Open Cookie as stored in memory */
 struct tcp_fastopen_cookie {
+       union {
+               u8      val[TCP_FASTOPEN_COOKIE_MAX];
+#if IS_ENABLED(CONFIG_IPV6)
+               struct in6_addr addr;
+#endif
+       };
        s8      len;
-       u8      val[TCP_FASTOPEN_COOKIE_MAX];
        bool    exp;    /* In RFC6994 experimental option format */
 };