> 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
__
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
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) {
>
> -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
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