Lines Matching refs:frag
659 iter->frag = skb_shinfo(skb)->frag_list; in ip6_fraglist_init()
690 struct sk_buff *frag = iter->frag; in ip6_fraglist_prepare() local
694 frag->ip_summed = CHECKSUM_NONE; in ip6_fraglist_prepare()
695 skb_reset_transport_header(frag); in ip6_fraglist_prepare()
696 fh = __skb_push(frag, sizeof(struct frag_hdr)); in ip6_fraglist_prepare()
697 __skb_push(frag, hlen); in ip6_fraglist_prepare()
698 skb_reset_network_header(frag); in ip6_fraglist_prepare()
699 memcpy(skb_network_header(frag), iter->tmp_hdr, hlen); in ip6_fraglist_prepare()
704 if (frag->next) in ip6_fraglist_prepare()
707 ipv6_hdr(frag)->payload_len = htons(frag->len - sizeof(struct ipv6hdr)); in ip6_fraglist_prepare()
708 ip6_copy_metadata(frag, skb); in ip6_fraglist_prepare()
736 struct sk_buff *frag; in ip6_frag_next() local
750 frag = alloc_skb(len + state->hlen + sizeof(struct frag_hdr) + in ip6_frag_next()
752 if (!frag) in ip6_frag_next()
759 ip6_copy_metadata(frag, skb); in ip6_frag_next()
760 skb_reserve(frag, state->hroom); in ip6_frag_next()
761 skb_put(frag, len + state->hlen + sizeof(struct frag_hdr)); in ip6_frag_next()
762 skb_reset_network_header(frag); in ip6_frag_next()
763 fh = (struct frag_hdr *)(skb_network_header(frag) + state->hlen); in ip6_frag_next()
764 frag->transport_header = (frag->network_header + state->hlen + in ip6_frag_next()
772 skb_set_owner_w(frag, skb->sk); in ip6_frag_next()
777 skb_copy_from_linear_data(skb, skb_network_header(frag), state->hlen); in ip6_frag_next()
779 fragnexthdr_offset = skb_network_header(frag); in ip6_frag_next()
793 BUG_ON(skb_copy_bits(skb, state->ptr, skb_transport_header(frag), in ip6_frag_next()
800 ipv6_hdr(frag)->payload_len = htons(frag->len - sizeof(struct ipv6hdr)); in ip6_frag_next()
805 return frag; in ip6_frag_next()
812 struct sk_buff *frag; in ip6_fragment() local
876 skb_walk_frags(skb, frag) { in ip6_fragment()
878 if (frag->len > mtu || in ip6_fragment()
879 ((frag->len & 7) && frag->next) || in ip6_fragment()
880 skb_headroom(frag) < (hlen + hroom + sizeof(struct frag_hdr))) in ip6_fragment()
884 if (skb_shared(frag)) in ip6_fragment()
887 BUG_ON(frag->sk); in ip6_fragment()
889 frag->sk = skb->sk; in ip6_fragment()
890 frag->destructor = sock_wfree; in ip6_fragment()
892 skb->truesize -= frag->truesize; in ip6_fragment()
903 if (iter.frag) in ip6_fragment()
912 if (err || !iter.frag) in ip6_fragment()
926 kfree_skb_list(iter.frag); in ip6_fragment()
934 if (frag2 == frag) in ip6_fragment()
956 frag = ip6_frag_next(skb, &state); in ip6_fragment()
957 if (IS_ERR(frag)) { in ip6_fragment()
958 err = PTR_ERR(frag); in ip6_fragment()
965 frag->tstamp = tstamp; in ip6_fragment()
966 err = output(net, sk, frag); in ip6_fragment()