vserver 2.0 rc7
[linux-2.6.git] / net / ipv4 / ip_input.c
index 51069c0..4e47a26 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Version:    $Id: ip_input.c,v 1.55 2002/01/12 07:39:45 davem Exp $
  *
- * Authors:    Ross Biro, <bir7@leland.Stanford.Edu>
+ * Authors:    Ross Biro
  *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  *             Donald Becker, <becker@super.org>
  *             Alan Cox, <Alan.Cox@linux.org>
@@ -410,10 +410,9 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
                 * is IP we can trim to the true length of the frame.
                 * Note this now means skb->len holds ntohs(iph->tot_len).
                 */
-               if (skb->len > len) {
-                       __pskb_trim(skb, len);
-                       if (skb->ip_summed == CHECKSUM_HW)
-                               skb->ip_summed = CHECKSUM_NONE;
+               if (pskb_trim_rcsum(skb, len)) {
+                       IP_INC_STATS_BH(IPSTATS_MIB_INDISCARDS);
+                       goto drop;
                }
        }