[SK_BUFF]: Introduce skb_set_transport_header
[deliverable/linux.git] / net / ipv4 / tcp_input.c
index fb0256085948eb709da3e37536db3c6bf2fbfea4..2776a8b013396e5f443897a59a4c427a8396e120 100644 (file)
@@ -3632,11 +3632,14 @@ tcp_collapse(struct sock *sk, struct sk_buff_head *list,
                nskb = alloc_skb(copy+header, GFP_ATOMIC);
                if (!nskb)
                        return;
+
+               skb_set_mac_header(nskb, skb_mac_header(skb) - skb->head);
+               skb_set_network_header(nskb,
+                                      skb_network_header(skb) - skb->head);
+               skb_set_transport_header(nskb, skb->h.raw - skb->head);
+
                skb_reserve(nskb, header);
                memcpy(nskb->head, skb->head, header);
-               nskb->nh.raw = nskb->head + (skb->nh.raw-skb->head);
-               nskb->h.raw = nskb->head + (skb->h.raw-skb->head);
-               nskb->mac.raw = nskb->head + (skb->mac.raw-skb->head);
                memcpy(nskb->cb, skb->cb, sizeof(skb->cb));
                TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(nskb)->end_seq = start;
                __skb_insert(nskb, skb->prev, skb, list);
This page took 0.024253 seconds and 5 git commands to generate.