All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@netronome.com>
To: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Pointer type of _arp in __skb_flow_dissect()
Date: Mon, 3 Apr 2017 04:47:15 -0400	[thread overview]
Message-ID: <20170403084714.GB30894@vergenet.net> (raw)
In-Reply-To: <9bb97603-3b86-73cb-8ed8-c421055138a6@m4x.org>

Hi Nicolas,

thanks for pointing this out.

On Fri, Mar 31, 2017 at 08:53:10PM +0200, Nicolas Iooss wrote:
> Hello,
> 
> Linux 4.11-rc4 contains the following code in function
> __skb_flow_dissect(), file net/core/flow_dissector.c:
> 
> 	const struct arphdr *arp;
> 	struct arphdr *_arp;

It looks like *_arp should be _arp.
And it looks like this affects net, since v4.11-rc1, and net-next.
I'll test the fix and post a patch unless someone beats me to it.

> 
> 	arp = __skb_header_pointer(skb, nhoff, sizeof(_arp), data,
> 				   hlen, &_arp);
> 
> 
> Here _arp and arp are both pointers to arphdr structures. In other calls
> to __skb_header_pointer(), the buffer argument (_arp here) would have
> been a struct instead of a pointer. What makes ARP packets different in
> __skb_flow_dissect()?
> 
> Thanks,
> Nicolas
> 
> PS: the code which I am curious about seems to have been introduced in
> 4.11-rc1 with commit 55733350e5e8 ("flow disector: ARP support")

      reply	other threads:[~2017-04-03  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 18:53 Pointer type of _arp in __skb_flow_dissect() Nicolas Iooss
2017-04-03  8:47 ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170403084714.GB30894@vergenet.net \
    --to=simon.horman@netronome.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.iooss_linux@m4x.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.