]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/x25/x25_dev.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6-omap-h63xx.git] / net / x25 / x25_dev.c
index adfe7b8df35591d29ee2d8a91de8bca57e9a3052..f099fd6a7c0ef2b34a6e92f1df24fb4b526a798a 100644 (file)
@@ -17,7 +17,6 @@
  *      2000-09-04     Henner Eisen    Prevent freeing a dangling skb.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
@@ -57,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;
        }
 
@@ -67,9 +67,18 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb)
                return x25_rx_call_request(skb, nb, lci);
 
        /*
-        *      Its not a Call Request, nor is it a control frame.
-        *      Let caller throw it away.
+        *      Its not a Call Request, nor is it a control frame.
+        *      Can we forward it?
         */
+
+       if (x25_forward_data(lci, nb, skb)) {
+               if (frametype == X25_CLEAR_CONFIRMATION) {
+                       x25_clear_forward_by_lci(lci);
+               }
+               kfree_skb(skb);
+               return 1;
+       }
+
 /*
        x25_transmit_clear_request(nb, lci, 0x0D);
 */