X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=net%2Fipv4%2Fip_output.c;h=4233cbe47052d83d856908185945635433b8613c;hb=bdc15ce316507225587552a3e63e7e09d94b81be;hp=50e29737b584624b6d338630622e87634961612e;hpb=ba3e2084f268bdfed7627046e58a2218037e15af;p=karo-tx-linux.git diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 50e29737b584..4233cbe47052 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 (skb->ip_summed == CHECKSUM_PARTIAL && + (err = skb_checksum_help(skb))) + goto fail; + /* * Point into the IP datagram header. */ @@ -657,9 +662,6 @@ slow_path_clean: } slow_path: - /* for offloaded checksums cleanup checksum before fragmentation */ - if ((skb->ip_summed == CHECKSUM_PARTIAL) && skb_checksum_help(skb)) - goto fail; iph = ip_hdr(skb); left = skb->len - hlen; /* Space per frame */ @@ -911,6 +913,7 @@ static int __ip_append_data(struct sock *sk, if (transhdrlen && length + fragheaderlen <= mtu && rt->dst.dev->features & NETIF_F_V4_CSUM && + !(flags & MSG_MORE) && !exthdrlen) csummode = CHECKSUM_PARTIAL;