]> err.no Git - linux-2.6/blobdiff - net/ipv4/udp.c
[IPV4]: Fix refcount damaging in net/ipv4/route.c
[linux-2.6] / net / ipv4 / udp.c
index 3a5bbbe7dd85586668fc5f20ae57fff150ac401e..e0bd1013cb0d0053c3d4b0f5fe0bbd2befa9ad48 100644 (file)
  *     Snmp MIB for the UDP layer
  */
 
-DEFINE_SNMP_STAT(struct udp_mib, udp_statistics);
+DEFINE_SNMP_STAT(struct udp_mib, udp_statistics) __read_mostly;
 
 struct hlist_head udp_hash[UDP_HTABLE_SIZE];
 DEFINE_RWLOCK(udp_hash_lock);
@@ -1141,7 +1141,7 @@ int udp_rcv(struct sk_buff *skb)
        if (ulen > len || ulen < sizeof(*uh))
                goto short_packet;
 
-       if (pskb_trim(skb, ulen))
+       if (pskb_trim_rcsum(skb, ulen))
                goto short_packet;
 
        if (udp_checksum_init(skb, uh, ulen, saddr, daddr) < 0)