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, gfree.wind@gmail.com
Subject: Re: [PATCH 1/1] netfilter: tcp/udp: Only get 4 bytes to get tcp/udp ports
Date: Sat, 23 Jul 2016 12:29:52 +0200	[thread overview]
Message-ID: <20160723102952.GB3204@salvia> (raw)
In-Reply-To: <1469203162-12717-1-git-send-email-fgao@ikuai8.com>

On Fri, Jul 22, 2016 at 11:59:22PM +0800, fgao@ikuai8.com wrote:
> From: Gao Feng <fgao@ikuai8.com>
> 
> We use tcp/udp_pkt_to_tuple to get the ports of tcp/udp.
> Actually only need to get 4 bytes by skb_header_pointer instead
> of 8 bytes.
> 
> Signed-off-by: Gao Feng <fgao@ikuai8.com>
> ---
>  v2: Use 4 bytes intead of 8 bytes, and add more description
>  v1: Initial Patch
> 
>  net/netfilter/nf_conntrack_proto_tcp.c | 4 ++--
>  net/netfilter/nf_conntrack_proto_udp.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
> index 70c8381..4abe9e1 100644
> --- a/net/netfilter/nf_conntrack_proto_tcp.c
> +++ b/net/netfilter/nf_conntrack_proto_tcp.c

Could you also review other existing trackers? eg. SCTP.

      reply	other threads:[~2016-07-23 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 15:59 [PATCH 1/1] netfilter: tcp/udp: Only get 4 bytes to get tcp/udp ports fgao
2016-07-23 10:29 ` 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=20160723102952.GB3204@salvia \
    --to=pablo@netfilter.org \
    --cc=fgao@ikuai8.com \
    --cc=gfree.wind@gmail.com \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.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 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).