]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix the counter ICMP_MIB_INERRORS/ICMP6_MIB_INERRORS
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Thu, 31 Jul 2014 09:54:32 +0000 (17:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Aug 2014 05:04:18 +0000 (22:04 -0700)
commitd55570d3cae10add2a6a2ec0ccb3568ded355d5b
tree97d39043b738e7cd135efcd242dc2430919da2da
parent8d827323c8007458ed6f2b39eb521468fd27e43f
net: fix the counter ICMP_MIB_INERRORS/ICMP6_MIB_INERRORS

When dealing with ICMPv[46] Error Message, function icmp_socket_deliver()
and icmpv6_notify() do some valid checks on packet's length, but then some
protocols check packet's length redaudantly. So remove those duplicated
statements, and increase counter ICMP_MIB_INERRORS/ICMP6_MIB_INERRORS in
function icmp_socket_deliver() and icmpv6_notify() respectively.

In addition, add missed counter in udp6/udplite6 when socket is NULL.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/icmp.c
net/ipv4/tcp_ipv4.c
net/ipv6/icmp.c
net/ipv6/udp.c
net/sctp/input.c