From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net
Subject: Re: [PATCH nf-next] netfilter: x_tables: add context to know if extension runs from nft_compat
Date: Mon, 2 Mar 2015 14:50:15 +0100 [thread overview]
Message-ID: <20150302135015.GA21965@salvia> (raw)
In-Reply-To: <20150302131940.GA7418@breakpoint.cc>
On Mon, Mar 02, 2015 at 02:19:40PM +0100, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > 2) TCPMSS. Relax the checking when used from nft_compat and make sure
> > that we skip !syn packets in case userspace provides a wrong
> > configuration.
> > diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
> > index e762de5..3b9761f 100644
> > --- a/net/netfilter/xt_TCPMSS.c
> > +++ b/net/netfilter/xt_TCPMSS.c
> > @@ -97,6 +97,9 @@ tcpmss_mangle_packet(struct sk_buff *skb,
> > if (!skb_make_writable(skb, skb->len))
> > return -1;
> >
> > + if (unlikely(!tcph->syn))
> > + return 0;
> > +
> > len = skb->len - tcphoff;
>
> Applying this to my copy of nf-next would insert this test before
> tcph is set up.
Thanks, will fix this up.
prev parent reply other threads:[~2015-03-02 13:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 13:11 [PATCH nf-next] netfilter: x_tables: add context to know if extension runs from nft_compat Pablo Neira Ayuso
2015-03-02 13:19 ` Patrick McHardy
2015-03-02 14:03 ` Pablo Neira Ayuso
2015-03-02 14:19 ` Patrick McHardy
2015-03-02 14:30 ` Pablo Neira Ayuso
2015-03-02 14:36 ` Patrick McHardy
2015-03-02 15:21 ` Pablo Neira Ayuso
2015-03-02 15:30 ` Patrick McHardy
2015-03-02 13:19 ` Florian Westphal
2015-03-02 13:27 ` Patrick McHardy
2015-03-02 13:58 ` Pablo Neira Ayuso
2015-03-02 13:50 ` 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=20150302135015.GA21965@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--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 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.