tcp repair: Fix unaligned access when repairing options (v2)
authorPavel Emelyanov <xemul@parallels.com>
Wed, 25 Apr 2012 23:43:04 +0000 (23:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Apr 2012 10:13:51 +0000 (06:13 -0400)
commitde248a75c35e0208294cf304b112916254b69184
tree0d00a02fdb994f8b1cbf239c11080fec86977639
parent2d319508a3551d2995e5cd12d649821b3be00e5b
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>
include/linux/tcp.h
net/ipv4/tcp.c