From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Alexey Kodanev <alexey.kodanev@oracle.com>,
<netdev@vger.kernel.org>, David Miller <davem@davemloft.net>
Subject: Re: [PATCH] udp: avoid ufo handling on IP payload compression packets
Date: Tue, 7 Mar 2017 08:53:24 +0100 [thread overview]
Message-ID: <20170307075324.GF694@gauss.secunet.com> (raw)
In-Reply-To: <20170307070150.GA25144@gondor.apana.org.au>
On Tue, Mar 07, 2017 at 03:01:50PM +0800, Herbert Xu wrote:
> On Mon, Mar 06, 2017 at 07:16:57AM +0100, Steffen Klassert wrote:
> >
> > > diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
> > > index b67719f..18383ef 100644
> > > --- a/net/ipv4/ip_output.c
> > > +++ b/net/ipv4/ip_output.c
> > > @@ -960,7 +960,10 @@ static int __ip_append_data(struct sock *sk,
> > > cork->length += length;
> > > if ((((length + fragheaderlen) > mtu) || (skb && skb_is_gso(skb))) &&
> > > (sk->sk_protocol == IPPROTO_UDP) &&
> > > - (rt->dst.dev->features & NETIF_F_UFO) && !rt->dst.header_len &&
> > > + (rt->dst.dev->features & NETIF_F_UFO) &&
> > > +#ifdef CONFIG_XFRM
> > > + !rt->dst.xfrm &&
> > > +#endif
> >
> > Please fix IPcomp to use rt->dst.header_len instead off adding
> > this ifdef to the generic networking code.
>
> It's not that simple though. IPComp's header_len is set to zero
> because we opportunistically drop the IPComp header when the total
> compressed length exceeds the original packet length. That is,
> we only ever do IPComp when it does not cause the packet to expand.
Yes, indeed. And it makes sense of course.
>
> So it seems that we need another way of indicating the presence of
> XFRM.
Then we probably have to use the !rt->dst.xfrm check. But then
we should use dst_xfrm() accessor, this avoids the ifdef here.
next prev parent reply other threads:[~2017-03-07 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 12:37 [PATCH] udp: avoid ufo handling on IP payload compression packets Alexey Kodanev
2017-03-06 6:16 ` Steffen Klassert
2017-03-07 7:01 ` Herbert Xu
2017-03-07 7:53 ` Steffen Klassert [this message]
2017-03-07 21:46 ` David Miller
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=20170307075324.GF694@gauss.secunet.com \
--to=steffen.klassert@secunet.com \
--cc=alexey.kodanev@oracle.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@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).