Hello.
On 10/27/2015 06:02 PM, Hannes Frederic Sowa wrote:
CHECKSUM_PARTIAL skbs should never arrive in ip_fragment. If we get one
of those warn about them once and handle them gracefully by recalculating
the checksum.
Cc: Eric Dumazet <[email protected]>
Cc: Vlad Yasevich <[email protected]>
Cc: Benjamin Coddington <[email protected]>
Cc: Tom Herbert <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
---
net/ipv4/ip_output.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 0b02417..3f94a3b 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -533,6 +533,11 @@ int ip_do_fragment(struct net *net, struct sock *sk,
struct sk_buff *skb,
dev = rt->dst.dev;
+ /* for offloaded checksums cleanup checksum before fragmentation */
+ if (WARN_ON_ONCE(skb->ip_summed == CHECKSUM_PARTIAL) &&
+ (err = skb_checksum_help(skb)))
scripts/checkpatch.pl shou;d have complained about using = in the *if*
expression.
+ goto fail;
+
/*
* Point into the IP datagram header.
*/
[...]
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html