On Wed, 2016-12-21 at 13:27 +0100, Hannes Frederic Sowa wrote: > @@ -555,8 +566,8 @@ static int rawv6_push_pending_frames(struct sock *sk, > struct flowi6 *fl6, > goto out; > > offset = rp->offset; > - total_len = inet_sk(sk)->cork.base.length; > - if (offset >= total_len - 1) { > + transport_len = raw6_corked_transport_len(sk); > + if (offset >= transport_len - 1) { > err = -EINVAL; > ip6_flush_pending_frames(sk); > goto out; > @@ -598,7 +609,7 @@ static int rawv6_push_pending_frames(struct sock *sk, > struct flowi6 *fl6, > tmp_csum = csum_sub(tmp_csum, csum_unfold(csum)); > > csum = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, > - total_len, fl6->flowi6_proto, tmp_csum); > + transport_len, fl6->flowi6_proto, tmp_csum); > >
Ops, here we need actually the total_len plus the opt->opt_nflen to always calculate the correct checksum.