Commit 0e8cef16 authored by David S. Miller's avatar David S. Miller

[X25]: Fix to be PKT_CAN_SHARE_SKB.

parent 11c4348e
...@@ -1345,6 +1345,7 @@ SOCKOPS_WRAP(x25_proto, AF_X25); ...@@ -1345,6 +1345,7 @@ SOCKOPS_WRAP(x25_proto, AF_X25);
static struct packet_type x25_packet_type = { static struct packet_type x25_packet_type = {
.type = __constant_htons(ETH_P_X25), .type = __constant_htons(ETH_P_X25),
.func = x25_lapb_receive_frame, .func = x25_lapb_receive_frame,
.data = PKT_CAN_SHARE_SKB,
}; };
struct notifier_block x25_dev_notifier = { struct notifier_block x25_dev_notifier = {
......
...@@ -100,9 +100,14 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb) ...@@ -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, int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev,
struct packet_type *ptype) struct packet_type *ptype)
{ {
struct sk_buff *nskb;
struct x25_neigh *nb; 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. * Packet received from unrecognised device, throw it away.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment