Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a0ff716 authored by Mitsuru Chinen's avatar Mitsuru Chinen Committed by David S. Miller
Browse files

[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: default avatarMitsuru Chinen <mitch@linux.vnet.ibm.com>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3f192b5c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -205,12 +205,11 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
	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;
}