diff options
author | Konstantin Khlebnikov <koct9i@gmail.com> | 2016-01-08 15:21:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-31 11:23:36 -0800 |
commit | abefd1b4087b9b5e83e7b4e7689f8b8e3cb2899c (patch) | |
tree | 317a9c239553d9c22f8cd9108d71bea6adb63431 /include/linux | |
parent | 4bb526bce19d6e4c8cc862ce304b8c072ef43366 (diff) | |
download | lwn-abefd1b4087b9b5e83e7b4e7689f8b8e3cb2899c.tar.gz lwn-abefd1b4087b9b5e83e7b4e7689f8b8e3cb2899c.zip |
net: preserve IP control block during GSO segmentation
[ Upstream commit 9207f9d45b0ad071baa128e846d7e7ed85016df3 ]
Skb_gso_segment() uses skb control block during segmentation.
This patch adds 32-bytes room for previous control block which
will be copied into all resulting segments.
This patch fixes kernel crash during fragmenting forwarded packets.
Fragmentation requires valid IP CB in skb for clearing ip options.
Also patch removes custom save/restore in ovs code, now it's redundant.
Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
Link: http://lkml.kernel.org/r/CALYGNiP-0MZ-FExV2HutTvE9U-QQtkKSoE--KN=JQE5STYsjAA@mail.gmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/skbuff.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 4307e20a4a4a..1f17abe23725 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -3320,7 +3320,8 @@ struct skb_gso_cb { int encap_level; __u16 csum_start; }; -#define SKB_GSO_CB(skb) ((struct skb_gso_cb *)(skb)->cb) +#define SKB_SGO_CB_OFFSET 32 +#define SKB_GSO_CB(skb) ((struct skb_gso_cb *)((skb)->cb + SKB_SGO_CB_OFFSET)) static inline int skb_tnl_header_len(const struct sk_buff *inner_skb) { |