Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / net / rxrpc / transport.c
index 9bce779..dbe6105 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/in.h>
 #include <linux/in6.h>
 #include <linux/icmp.h>
+#include <linux/skbuff.h>
 #include <net/sock.h>
 #include <net/ip.h>
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
@@ -330,7 +331,7 @@ static int rxrpc_incoming_msg(struct rxrpc_transport *trans,
 
        msg->trans = trans;
        msg->state = RXRPC_MSG_RECEIVED;
-       msg->stamp = pkt->stamp;
+       skb_get_timestamp(pkt, &msg->stamp);
        if (msg->stamp.tv_sec == 0) {
                do_gettimeofday(&msg->stamp); 
                if (pkt->sk) 
@@ -475,15 +476,11 @@ void rxrpc_trans_receive_packet(struct rxrpc_transport *trans)
 
                /* we'll probably need to checksum it (didn't call
                 * sock_recvmsg) */
-               if (pkt->ip_summed != CHECKSUM_UNNECESSARY) {
-                       if ((unsigned short)
-                           csum_fold(skb_checksum(pkt, 0, pkt->len,
-                                                  pkt->csum))) {
-                               kfree_skb(pkt);
-                               rxrpc_krxiod_queue_transport(trans);
-                               _leave(" CSUM failed");
-                               return;
-                       }
+               if (skb_checksum_complete(pkt)) {
+                       kfree_skb(pkt);
+                       rxrpc_krxiod_queue_transport(trans);
+                       _leave(" CSUM failed");
+                       return;
                }
 
                addr = pkt->nh.iph->saddr;