Skip to contentSkip to conversation

SNMP: Restore Udp6InErrors incrementation

PATCH Applied Mitsuru Chinen 3 participants 3 messages Nov 1, 2007 – Nov 6, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/ipv6/udp.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
net/ipv6/udp.c +2 -3
index caebad6..8344d8c 100644
@@ -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;
 }
 
Signature · 1 line
1.5.3.4
#1 lore raw
Quoted 6 lines · Mitsuru Chinen

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.

Looks good to me. Thanks for catching this!

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer Applied
#2 lore raw

From: Herbert Xu <[email protected]>
Date: Thu, 1 Nov 2007 23:05:00 +0800

Quoted 9 lines · Mitsuru Chinen
Quoted 6 lines

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.

Looks good to me. Thanks for catching this!

Applied.