]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv6/udp.c
[UDP]: Defer InDataGrams increment until recvmsg() does checksum
[karo-tx-linux.git] / net / ipv6 / udp.c
index 8344d8c87219f4d4000f556a0202ed638abf47b6..b0474a618bbe6afd8024d19e3c5bf68d7b8ca6fe 100644 (file)
@@ -164,6 +164,8 @@ try_again:
        if (err)
                goto out_free;
 
+       UDP6_INC_STATS_USER(UDP_MIB_INDATAGRAMS, is_udplite);
+
        sock_recv_timestamp(msg, sk, skb);
 
        /* Copy the address. */
@@ -292,7 +294,7 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
                        UDP6_INC_STATS_BH(UDP_MIB_RCVBUFERRORS, up->pcflag);
                goto drop;
        }
-       UDP6_INC_STATS_BH(UDP_MIB_INDATAGRAMS, up->pcflag);
+
        return 0;
 drop:
        UDP6_INC_STATS_BH(UDP_MIB_INERRORS, up->pcflag);
@@ -970,6 +972,8 @@ void udp6_proc_exit(void) {
 
 /* ------------------------------------------------------------------------ */
 
+DEFINE_PROTO_INUSE(udpv6)
+
 struct proto udpv6_prot = {
        .name              = "UDPv6",
        .owner             = THIS_MODULE,
@@ -991,6 +995,7 @@ struct proto udpv6_prot = {
        .compat_setsockopt = compat_udpv6_setsockopt,
        .compat_getsockopt = compat_udpv6_getsockopt,
 #endif
+       REF_PROTO_INUSE(udpv6)
 };
 
 static struct inet_protosw udpv6_protosw = {