diff options
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index bebc821086947..ce501a73ebd7a 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -576,8 +576,11 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, } offset += skb_transport_offset(skb); - if (skb_copy_bits(skb, offset, &csum, 2)) - BUG(); + err = skb_copy_bits(skb, offset, &csum, 2); + if (err < 0) { + ip6_flush_pending_frames(sk); + goto out; + } /* in case cksum was not initialized */ if (unlikely(csum)) |