]> git.neil.brown.name Git - history.git/commitdiff
[X25]: Fix to be PKT_CAN_SHARE_SKB.
authorDavid S. Miller <davem@nuts.ninka.net>
Mon, 6 Oct 2003 20:40:52 +0000 (13:40 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Mon, 6 Oct 2003 20:40:52 +0000 (13:40 -0700)
net/x25/af_x25.c
net/x25/x25_dev.c

index 83b57963397e4af31932e433ca0e3e9eae083b73..6ec148f02a2693dd95012c4923534af4882a1c36 100644 (file)
@@ -1345,6 +1345,7 @@ SOCKOPS_WRAP(x25_proto, AF_X25);
 static struct packet_type x25_packet_type = {
        .type = __constant_htons(ETH_P_X25),
        .func = x25_lapb_receive_frame,
+       .data = PKT_CAN_SHARE_SKB,
 };
 
 struct notifier_block x25_dev_notifier = {
index 17ef400a4b981b8585256364e0c3e359fe057aad..f58aa65ea9652c27566667281a55851a20a7d9a8 100644 (file)
@@ -100,9 +100,14 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb)
 int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev,
                           struct packet_type *ptype)
 {
+       struct sk_buff *nskb;
        struct x25_neigh *nb;
 
-       skb->sk = NULL;
+       nskb = skb_copy(skb, GFP_ATOMIC);
+       if (!nskb)
+               goto drop;
+       kfree_skb(skb);
+       skb = nskb;
 
        /*
         * Packet received from unrecognised device, throw it away.