Do not print ICMP fields for non IP packets.
authorMehak Mahajan <mmahajan@nicira.com>
Mon, 22 Oct 2012 21:01:40 +0000 (14:01 -0700)
committerMehak Mahajan <mmahajan@nicira.com>
Mon, 22 Oct 2012 21:34:35 +0000 (14:34 -0700)
commit19564d20d6ed03334299e69d078aa11b81c958af
treeb1d0dc1d60578a671b704529aa68656a982a3a06
parentaa6c9932f2937fa9a2140ec1737668eb9105b0b5
Do not print ICMP fields for non IP packets.

The packet's nw_proto field overlaps with the ARP opcode field.  The
nw_proto for ICMP packets is 1.  Hence when the packet is an ARP
request (opcode 1), we erroneously print the ICMP code and ICMP type
for ARP frames as well.  With this commit, the ICMP code and ICMP
type will be printed only if the packet is an IP packet and the
nw_proto is ICMP.

Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/match.c
tests/ofp-print.at