]> git.baikalelectronics.ru Git - kernel.git/commit
flow_dissector: skip the ICMP dissector for non ICMP packets
authorMatteo Croce <mcroce@redhat.com>
Tue, 29 Oct 2019 13:50:51 +0000 (14:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 00:21:35 +0000 (17:21 -0700)
commit404af2558bb0bb6a44e52fd1acd351aa870177f9
treebedc154ea4528ee99b1376f57007747cbec05190
parent701f8eeefc148e09aa3fad53d1781c47b53321dc
flow_dissector: skip the ICMP dissector for non ICMP packets

FLOW_DISSECTOR_KEY_ICMP is checked for every packet, not only ICMP ones.
Even if the test overhead is probably negligible, move the
ICMP dissector code under the big 'switch(ip_proto)' so it gets called
only for ICMP packets.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/flow_dissector.c