diff options
author | Konstantin Khlebnikov <koct9i@gmail.com> | 2016-01-08 15:21:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-15 14:35:24 -0500 |
commit | 9207f9d45b0ad071baa128e846d7e7ed85016df3 (patch) | |
tree | 9053fd455c6a19176174674e898ee05c37724827 /net/ipv4/ip_output.c | |
parent | 5d19c619ab3f0551864684f09c2a2f22ee972bef (diff) | |
download | op-kernel-dev-9207f9d45b0ad071baa128e846d7e7ed85016df3.zip op-kernel-dev-9207f9d45b0ad071baa128e846d7e7ed85016df3.tar.gz |
net: preserve IP control block during GSO segmentation
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>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 512a447..64878ef 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -239,6 +239,7 @@ static int ip_finish_output_gso(struct net *net, struct sock *sk, * from host network stack. */ features = netif_skb_features(skb); + BUILD_BUG_ON(sizeof(*IPCB(skb)) > SKB_SGO_CB_OFFSET); segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK); if (IS_ERR_OR_NULL(segs)) { kfree_skb(skb); |