projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f26ba17
)
udp: Fix the SNMP counter of UDP_MIB_INERRORS
author
Wei Yongjun
<
[email protected]
>
Sun, 2 Nov 2008 16:14:27 +0000
(16:14 +0000)
committer
David S. Miller
<
[email protected]
>
Mon, 3 Nov 2008 07:52:46 +0000
(23:52 -0800)
UDP packets received in udpv6_recvmsg() are not only IPv6 UDP packets, but
also have IPv4 UDP packets, so when do the counter of UDP_MIB_INERRORS in
udpv6_recvmsg(), we should check whether the packet is a IPv6 UDP packet
or a IPv4 UDP packet.
Signed-off-by: Wei Yongjun <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv6/udp.c
patch
|
blob
|
history
diff --git
a/net/ipv6/udp.c
b/net/ipv6/udp.c
index 18696af106d66c2876ac4c718ab38937a1172ef8..8b48512ebf6ac98ce279a7ca69daa6639970f1e3 100644
(file)
--- a/
net/ipv6/udp.c
+++ b/
net/ipv6/udp.c
@@
-236,8
+236,14
@@
out:
csum_copy_err:
lock_sock(sk);
- if (!skb_kill_datagram(sk, skb, flags))
- UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
+ if (!skb_kill_datagram(sk, skb, flags)) {
+ if (is_udp4)
+ UDP_INC_STATS_USER(sock_net(sk),
+ UDP_MIB_INERRORS, is_udplite);
+ else
+ UDP6_INC_STATS_USER(sock_net(sk),
+ UDP_MIB_INERRORS, is_udplite);
+ }
release_sock(sk);
if (flags & MSG_DONTWAIT)