X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fx25%2Fx25_dev.c;h=328d80f000ad67dbc6162b6fb97c542621e1f2d6;hb=refs%2Fheads%2Fvserver;hp=f58aa65ea9652c27566667281a55851a20a7d9a8;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c index f58aa65ea..328d80f00 100644 --- a/net/x25/x25_dev.c +++ b/net/x25/x25_dev.c @@ -17,30 +17,10 @@ * 2000-09-04 Henner Eisen Prevent freeing a dangling skb. */ -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include -#include /* For TIOCINQ/OUTQ */ -#include -#include -#include -#include #include #include @@ -76,6 +56,7 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb) sk_add_backlog(sk, skb); } bh_unlock_sock(sk); + sock_put(sk); return queued; } @@ -92,13 +73,15 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb) /* x25_transmit_clear_request(nb, lci, 0x0D); */ - printk(KERN_DEBUG "x25_receive_data(): unknown frame type %2x\n",frametype); + + if (frametype != X25_CLEAR_CONFIRMATION) + printk(KERN_DEBUG "x25_receive_data(): unknown frame type %2x\n",frametype); return 0; } int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev, - struct packet_type *ptype) + struct packet_type *ptype, struct net_device *orig_dev) { struct sk_buff *nskb; struct x25_neigh *nb; @@ -140,29 +123,6 @@ out: return 0; } -int x25_llc_receive_frame(struct sk_buff *skb, struct net_device *dev, - struct packet_type *ptype) -{ - struct x25_neigh *nb; - int rc = 0; - - skb->sk = NULL; - - /* - * Packet received from unrecognised device, throw it away. - */ - nb = x25_get_neigh(dev); - if (!nb) { - printk(KERN_DEBUG "X.25: unknown_neighbour - %s\n", dev->name); - kfree_skb(skb); - } else { - rc = x25_receive_data(skb, nb); - x25_neigh_put(nb); - } - - return rc; -} - void x25_establish_link(struct x25_neigh *nb) { struct sk_buff *skb;