netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: fgao@ikuai8.com
Cc: kaber@trash.net, netfilter-devel@vger.kernel.org,
	philipp@redfish-solutions.com, netdev@vger.kernel.org,
	gfree.wind@gmail.com
Subject: Re: [PATCH 1/1] netfilter: gre: Use the consitent GRE and PPTP struct instead of the structures defined in netfilter
Date: Mon, 22 Aug 2016 11:22:09 +0200	[thread overview]
Message-ID: <20160822092209.GA2810@salvia> (raw)
In-Reply-To: <1471618894-10582-1-git-send-email-fgao@ikuai8.com>

On Fri, Aug 19, 2016 at 11:01:34PM +0800, fgao@ikuai8.com wrote:
> From: Gao Feng <fgao@ikuai8.com>
> 
> There are two structures which define the GRE header and PPTP
> header. So it is unneccessary to define duplicated structures in
> netfilter again.

Please, split this change in smaller patches, I'd suggest one to
replace GRE_* definitions and another to use generic GRE struct
definitions, so this makes it is easier to review.

> @@ -212,8 +212,8 @@ static bool gre_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff,
>  	if (!pgrehdr)
>  		return true;
>  
> -	if (ntohs(grehdr->protocol) != GRE_PROTOCOL_PPTP) {
> -		pr_debug("GRE_VERSION_PPTP but unknown proto\n");
> +	if (grehdr->protocol != GRE_PROTO_PPP) {
> +		pr_debug("Unknown GRE proto(0x%x)\n", ntohs(grehdr->protocol));

Something is fishy here, grehdr->protocol used to have ntohs(), the
pr_debug() still has it while the branch check does not.

      parent reply	other threads:[~2016-08-22  9:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19 15:01 [PATCH 1/1] netfilter: gre: Use the consitent GRE and PPTP struct instead of the structures defined in netfilter fgao
2016-08-19 15:03 ` Feng Gao
2016-08-25 12:16   ` Pablo Neira Ayuso
2016-08-25 13:38     ` Feng Gao
2016-08-22  9:22 ` Pablo Neira Ayuso [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=20160822092209.GA2810@salvia \
    --to=pablo@netfilter.org \
    --cc=fgao@ikuai8.com \
    --cc=gfree.wind@gmail.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=philipp@redfish-solutions.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).