]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/x25/x25_in.c
[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
[net-next-2.6.git] / net / x25 / x25_in.c
index c5239fcdefa0c6b155364ad70e7a11c3423982ec..ba13248aa1c31ba79f36f7d52702c2e0b45b361c 100644 (file)
@@ -53,7 +53,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
 
                skb_queue_tail(&x25->fragment_queue, skb);
 
-               skbn->h.raw = skbn->data;
+               skb_reset_transport_header(skbn);
 
                skbo = skb_dequeue(&x25->fragment_queue);
                memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
@@ -112,8 +112,9 @@ static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametyp
                         *      Copy any Call User Data.
                         */
                        if (skb->len >= 0) {
-                               memcpy(x25->calluserdata.cuddata, skb->data,
-                                      skb->len);
+                               skb_copy_from_linear_data(skb,
+                                             x25->calluserdata.cuddata,
+                                             skb->len);
                                x25->calluserdata.cudlength = skb->len;
                        }
                        if (!sock_flag(sk, SOCK_DEAD))