patch-2.2.13 linux/net/netrom/nr_loopback.c

Next file: linux/net/netsyms.c
Previous file: linux/net/ipx/af_ipx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.12/linux/net/netrom/nr_loopback.c linux/net/netrom/nr_loopback.c
@@ -11,6 +11,7 @@
  *
  *	History
  *	NET/ROM 007	Tomi(OH2BNS)	Created this file.
+ *                                      Small change in nr_loopback_queue().
  *
  */
 
@@ -44,17 +45,17 @@
 {
 	struct sk_buff *skbn;
 
-	skbn = skb_clone(skb, GFP_ATOMIC);
+	if ((skbn = alloc_skb(skb->len, GFP_ATOMIC)) != NULL) {
+		memcpy(skb_put(skbn, skb->len), skb->data, skb->len);
+		skbn->h.raw = skbn->data;
 
-	kfree_skb(skb);
-
-	if (skbn != NULL) {
 		skb_queue_tail(&loopback_queue, skbn);
 
 		if (!nr_loopback_running())
 			nr_set_loopback_timer();
 	}
 
+	kfree_skb(skb);
 	return 1;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)