From: Mitsuru Chinen Date: Tue, 6 Nov 2007 05:29:17 +0000 (-0800) Subject: [IPv6] SNMP: Restore Udp6InErrors incrementation X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7a0ff716c2282f4b8d89c65850a4f17399628154;p=openwrt%2Fstaging%2Fblogic.git [IPv6] SNMP: Restore Udp6InErrors incrementation 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 Acked-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index caebad6ee510..8344d8c87219 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -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; }