Skip to content

Commit

Permalink
[IPv6] SNMP: Restore Udp6InErrors incrementation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mitsuru Chinen authored and David S. Miller committed Nov 7, 2007
1 parent 3f192b5 commit 7a0ff71
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/ipv6/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7a0ff71

Please sign in to comment.