]> err.no Git - linux-2.6/commitdiff
[IPv6] SNMP: Restore Udp6InErrors incrementation
authorMitsuru Chinen <mitch@linux.vnet.ibm.com>
Tue, 6 Nov 2007 05:29:17 +0000 (21:29 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 7 Nov 2007 12:08:54 +0000 (04:08 -0800)
As the checksum verification is postponed till user calls recv or poll,
the inrementation of Udp6InErrors counter should be also postponed.
Currently, it is postponed in non-blocking operation case. However it
should be postponed in all case like the IPv4 code.

Signed-off-by: Mitsuru Chinen <mitch@linux.vnet.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/udp.c

index caebad6ee510d8927db4b0df4dd0d8c2dfb5ab42..8344d8c87219f4d4000f556a0202ed638abf47b6 100644 (file)
@@ -205,12 +205,11 @@ out:
        return err;
 
 csum_copy_err:
+       UDP6_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite);
        skb_kill_datagram(sk, skb, flags);
 
-       if (flags & MSG_DONTWAIT) {
-               UDP6_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite);
+       if (flags & MSG_DONTWAIT)
                return -EAGAIN;
-       }
        goto try_again;
 }