From: Julian Anastasov <ja@ssi.bg>
To: Simon Horman <horms@verge.net.au>
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Patrick McHardy <kaber@trash.net>,
Wensong Zhang <wensong@linux-vs.org>
Subject: Re: [patch net] ipvs: avoid oops for passive FTP
Date: Thu, 2 Sep 2010 23:52:16 +0300 (EEST) [thread overview]
Message-ID: <Pine.LNX.4.58.1009022310030.2891@u.domain.uli> (raw)
In-Reply-To: <20100902090709.GA15401@verge.net.au>
Hello,
On Thu, 2 Sep 2010, Simon Horman wrote:
> From: Julian Anastasov <ja@ssi.bg>
>
> Fix Passive FTP problem in ip_vs_ftp:
>
> - Do not oops in nf_nat_set_seq_adjust (adjust_tcp_sequence) when
> iptable_nat module is not loaded
>
> Signed-off-by: Julian Anastasov <ja@ssi.bg>
> Signed-off-by: Simon Horman <horms@verge.net.au>
>
> ---
>
> Dave, this patch fixes a regression since 2.6.35 so please consider it for net.
> Julian has also found another regression, but the fix is a bit
> more complex so I have posted it to the netfilter list for review.
Just to clarify that both patches for ip_vs_ftp are
only for code that come in 2.6.36-rc, 2.6.35 is ok and does
not need them.
The other problem is that 2.6.36-rc comes with
requirement IPVS to keep netfilter conntracks for all
connections, eg. DirectRouting, not only for LVS-NAT (ip_vs_ftp).
I have a bigger patch to make the IPVS conntracking support
an option (enabled by default only for ip_vs_ftp) but
may be it is not appropriate for -rc series. So, for now
we are fixing just the fatal problems but the risk of
IPVS setups with low nf_conntrack_max value to stop
processing high loads remains without making the conntrack
support an option. Before now all conntracks were created
and destroyed for every packet and nf_conntrack_max,
even if low, probably is never reached.
> http://marc.info/?l=netfilter-devel&m=128339248723532&w=2
>
> This change (and the other one) is also applicable to net-next, although
> there is some diff noise. Do you want me to resolve that and post a
> net-next version separately?
>
> --- v2.6.36-rc2/linux/net/netfilter/ipvs/ip_vs_ftp.c 2010-09-02 00:45:54.000000000 +0300
> +++ linux/net/netfilter/ipvs/ip_vs_ftp.c 2010-09-02 02:12:52.000000000 +0300
> @@ -45,6 +45,7 @@
> #include <linux/netfilter.h>
> #include <net/netfilter/nf_conntrack.h>
> #include <net/netfilter/nf_conntrack_expect.h>
> +#include <net/netfilter/nf_nat.h>
> #include <net/netfilter/nf_nat_helper.h>
> #include <linux/gfp.h>
> #include <net/protocol.h>
> @@ -359,7 +360,7 @@ static int ip_vs_ftp_out(struct ip_vs_ap
> buf_len = strlen(buf);
>
> ct = nf_ct_get(skb, &ctinfo);
> - if (ct && !nf_ct_is_untracked(ct)) {
> + if (ct && !nf_ct_is_untracked(ct) && nfct_nat(ct)) {
> /* If mangling fails this function will return 0
> * which will cause the packet to be dropped.
> * Mangling can only fail under memory pressure,
Regards
--
Julian Anastasov <ja@ssi.bg>
prev parent reply other threads:[~2010-09-02 20:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-02 9:07 [patch net] ipvs: avoid oops for passive FTP Simon Horman
2010-09-02 17:05 ` David Miller
2010-09-02 20:52 ` Julian Anastasov [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=Pine.LNX.4.58.1009022310030.2891@u.domain.uli \
--to=ja@ssi.bg \
--cc=davem@davemloft.net \
--cc=horms@verge.net.au \
--cc=kaber@trash.net \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=wensong@linux-vs.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).