patch-2.4.1 linux/drivers/isdn/isdn_ppp.c

Next file: linux/drivers/isdn/isdn_v110.c
Previous file: linux/drivers/isdn/isdn_net.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0/linux/drivers/isdn/isdn_ppp.c linux/drivers/isdn/isdn_ppp.c
@@ -1131,9 +1131,9 @@
 			proto = PPP_IPX;	/* untested */
 			break;
 		default:
-			dev_kfree_skb(skb);
 			printk(KERN_ERR "isdn_ppp: skipped unsupported protocol: %#x.\n", 
 			       skb->protocol);
+			dev_kfree_skb(skb);
 			return 0;
 	}
 
@@ -2310,8 +2310,7 @@
   		rsparm.data = rsdata;
   		rsparm.maxdlen = IPPP_RESET_MAXDATABYTES;
   
-		/* !!!HACK,HACK,HACK!!! 2048 is only assumed */
-  		skb_out = dev_alloc_skb(2048);
+  		skb_out = dev_alloc_skb(is->mru + PPP_HDRLEN);
 		len = ipc->decompress(stat, skb, skb_out, &rsparm);
 		kfree_skb(skb);
 		if (len <= 0) {
@@ -2332,14 +2331,9 @@
 			kfree_skb(skb_out);
 			return NULL;
 		}
-
-		if (isdn_ppp_skip_ac(ri, skb) < 0) {
-			kfree_skb(skb);
-			return NULL;
-		}
-		*proto = isdn_ppp_strip_proto(skb);
+		*proto = isdn_ppp_strip_proto(skb_out);
 		if (*proto < 0) {
-			kfree_skb(skb);
+			kfree_skb(skb_out);
 			return NULL;
 		}
 		return skb_out;

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