]> git.baikalelectronics.ru Git - kernel.git/commit
icmp: add helpers to recognize ICMP error packets
authorMatteo Croce <mcroce@redhat.com>
Sat, 2 Nov 2019 00:12:03 +0000 (01:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Nov 2019 22:03:11 +0000 (14:03 -0800)
commitfc8f3bfe1e7341525cf7b70b623344e8ddefad3a
tree756dfcf379828884fe9d13c62ff1048fb058516f
parentf65c20ddf61e5b63c295d13c48142f0fd2db4c3c
icmp: add helpers to recognize ICMP error packets

Add two helper functions, one for IPv4 and one for IPv6, to recognize
the ICMP packets which are error responses.
This packets are special because they have as payload the original
header of the packet which generated it (RFC 792 says at least 8 bytes,
but Linux actually includes much more than that).

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/icmp.h
include/linux/icmpv6.h