]> git.baikalelectronics.ru Git - kernel.git/commit
raw: increment correct SNMP counters for ICMP messages
authorBen Cartwright-Cox <ben@benjojo.co.uk>
Sat, 14 Nov 2015 15:13:58 +0000 (15:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Nov 2015 20:08:48 +0000 (15:08 -0500)
commit17cfe78d4fc7a02453e57dec4045e72ac120c87c
tree31841f2576a30bcdaa9619d6abd5189bd6f3e412
parent429d5c134db801c77c6d30aa6aa4dfa885d5c896
raw: increment correct SNMP counters for ICMP messages

Sending ICMP packets with raw sockets ends up in the SNMP counters
logging the type as the first byte of the IPv4 header rather than
the ICMP header. This is fixed by adding the IP Header Length to
the casting into a icmphdr struct.

Signed-off-by: Ben Cartwright-Cox <ben@benjojo.co.uk>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/raw.c