summaryrefslogtreecommitdiffstats
path: root/include/linux/tcp.h
diff options
context:
space:
mode:
authorPavel Emelyanov2012-04-26 01:43:04 +0200
committerDavid S. Miller2012-04-26 12:13:51 +0200
commitde248a75c35e0208294cf304b112916254b69184 (patch)
tree0d00a02fdb994f8b1cbf239c11080fec86977639 /include/linux/tcp.h
parent6lowpan: duplicate definition of IEEE802154_ALEN (diff)
downloadkernel-qcow2-linux-de248a75c35e0208294cf304b112916254b69184.tar.gz
kernel-qcow2-linux-de248a75c35e0208294cf304b112916254b69184.tar.xz
kernel-qcow2-linux-de248a75c35e0208294cf304b112916254b69184.zip
tcp repair: Fix unaligned access when repairing options (v2)
Don't pick __u8/__u16 values directly from raw pointers, but instead use an array of structures of code:value pairs. This is OK, since the buffer we take options from is not an skb memory, but a user-to-kernel one. For those options which don't require any value now, require this to be zero (for potential future extension of this API). v2: Changed tcp_repair_opt to use two __u32-s as spotted by David Laight. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/tcp.h')
-rw-r--r--include/linux/tcp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 986593685566..278af9ea42d4 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -111,6 +111,11 @@ enum {
#define TCP_QUEUE_SEQ 21
#define TCP_REPAIR_OPTIONS 22
+struct tcp_repair_opt {
+ __u32 opt_code;
+ __u32 opt_val;
+};
+
enum {
TCP_NO_QUEUE,
TCP_RECV_QUEUE,