Re: [ovs-dev] [PATCH 2/3] Do not print ICMP fields for non IP packets.

2012-10-22 Thread Ethan Jackson
> A lot of people disagree with this so some time ago we removed the > text that required binary operators at the beginning of a line Ah didn't realize we had done that. Most of the code uses the convention, but if it's no longer required that's fine. Ethan __

Re: [ovs-dev] [PATCH 2/3] Do not print ICMP fields for non IP packets.

2012-10-22 Thread Ben Pfaff
On Sat, Oct 20, 2012 at 12:49:12PM -0500, Ethan Jackson wrote: > > -if (f->nw_proto == IPPROTO_ICMP) { > > +if (f->dl_type == htons(ETH_TYPE_IP) && > > +f->nw_proto == IPPROTO_ICMP) { > > format_be16_masked(s, "icmp_type", f->tp_src, wc->masks.tp_src); > > format_b

Re: [ovs-dev] [PATCH 2/3] Do not print ICMP fields for non IP packets.

2012-10-20 Thread Mehak Mahajan
Hey Ethan, Thanks for the review. I will make these changes before pushing the patches. thanx! mehak On Sat, Oct 20, 2012 at 10:49 AM, Ethan Jackson wrote: > > -if (f->nw_proto == IPPROTO_ICMP) { > > +if (f->dl_type == htons(ETH_TYPE_IP) && > > +f->nw_proto == IPPROTO_ICMP) { >

Re: [ovs-dev] [PATCH 2/3] Do not print ICMP fields for non IP packets.

2012-10-20 Thread Ethan Jackson
> -if (f->nw_proto == IPPROTO_ICMP) { > +if (f->dl_type == htons(ETH_TYPE_IP) && > +f->nw_proto == IPPROTO_ICMP) { > format_be16_masked(s, "icmp_type", f->tp_src, wc->masks.tp_src); > format_be16_masked(s, "icmp_code", f->tp_dst, wc->masks.tp_dst); > -} else if

[ovs-dev] [PATCH 2/3] Do not print ICMP fields for non IP packets.

2012-10-17 Thread Mehak Mahajan
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 t