patch-2.2.2 linux/drivers/net/ppp.c

Next file: linux/drivers/net/smc-ultra.c
Previous file: linux/drivers/net/hostess_sv11.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.1/linux/drivers/net/ppp.c linux/drivers/net/ppp.c
@@ -2062,7 +2062,11 @@
 			       "ppp: error in VJ decompression\n");
 		return 0;
 	}
-	skb_put(skb, new_count + PPP_HDRLEN - skb->len);
+	new_count += PPP_HDRLEN;
+	if (new_count > skb->len)
+		skb_put(skb, new_count - skb->len);
+	else
+		skb_trim(skb, new_count);
 	return rcv_proto_ip(ppp, skb);
 }
 

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