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

Mehak Mahajan mmahajan at nicira.com
Sat Oct 20 22:45:38 UTC 2012


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 <ethan at nicira.com> 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_be16_masked(s, "icmp_code", f->tp_dst, wc->masks.tp_dst);
> > -    } else if (f->nw_proto == IPPROTO_ICMPV6) {
> > +    } else if (f->dl_type == htons(ETH_TYPE_IPV6) &&
> > +               f->nw_proto == IPPROTO_ICMPV6) {
>
> Traditionally we've put the && on the next line so you end up with:
>
> > +    if (f->dl_type == htons(ETH_TYPE_IP)
> > +        && f->nw_proto == IPPROTO_ICMP) {
>
> Otherwise looks good, thanks.
>
> Acked-by: Ethan Jackson <ethan at nicira.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20121020/7e0fcb8b/attachment-0003.html>


More information about the dev mailing list