netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Liping Zhang" <zlpwmdx@163.com>
To: "Pablo Neira Ayuso" <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net,
	davem@davemloft.net, kernel@kyup.com,
	"Liping Zhang" <liping.zhang@spreadtrum.com>
Subject: Re: [PATCH] netfilter: ipv4: fix NULL dereference
Date: Fri, 25 Mar 2016 15:24:17 +0800 (CST)	[thread overview]
Message-ID: <8a67176.7ced.153aca8cfbd.Coremail.zlpwmdx@163.com> (raw)
In-Reply-To: <20160324202205.GA2167@salvia>

At 2016-03-25 04:22:05, "Pablo Neira Ayuso" <pablo@netfilter.org> wrote:
>
>Could you also pass net as parameter to synproxy_send_server_syn() ?
>
>par->net provides this from synproxy_tg4().

Not pass the net but replace the first parameter 'snet' with 'net' seems better?
snet is only used in synproxy_recv_client_ack->synproxy_send_server_syn call path,
and in other call path, actually we only need net,  and we can call synproxy_pernet(net)
to get the snet.

like follows:
-synproxy_send_server_syn(const struct synproxy_net *snet,
+synproxy_send_server_syn(struct net *net,

-synproxy_recv_client_ack(const struct synproxy_net *snet,
+synproxy_recv_client_ack(struct net *net,
                         const struct sk_buff *skb, const struct tcphdr *th,
                         struct synproxy_options *opts, u32 recv_seq)  {
+       struct synproxy_net *snet = synproxy_pernet(net);

>
>Thanks.

      parent reply	other threads:[~2016-03-25  7:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 14:27 [PATCH] netfilter: ipv4: fix NULL dereference Liping Zhang
2016-03-24  8:00 ` Nikolay Borisov
     [not found]   ` <54382a12.8a92.153a7ba19ff.Coremail.zlpwmdx@163.com>
2016-03-24  8:45     ` Nikolay Borisov
2016-03-24 20:16   ` Pablo Neira Ayuso
2016-03-24 20:22 ` Pablo Neira Ayuso
2016-03-25  6:38   ` Liping Zhang
2016-03-25 10:49     ` Pablo Neira Ayuso
2016-03-25  7:24   ` Liping Zhang [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=8a67176.7ced.153aca8cfbd.Coremail.zlpwmdx@163.com \
    --to=zlpwmdx@163.com \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=kernel@kyup.com \
    --cc=liping.zhang@spreadtrum.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).