Netdev List
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: David L Stevens <dlstevens@us.ibm.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCHv2] fragment locally-generated IPsec6 packets that need it
Date: Wed, 15 Dec 2010 08:59:41 +0800	[thread overview]
Message-ID: <20101215005941.GA20448@gondor.apana.org.au> (raw)
In-Reply-To: <1292351554.4720.7.camel@IBM-1B506CFC885>

On Tue, Dec 14, 2010 at 10:32:34AM -0800, David L Stevens wrote:
>
> @@ -88,8 +89,17 @@ static int xfrm6_output_finish(struct sk
>  	return xfrm_output(skb);
>  }
>  
> -int xfrm6_output(struct sk_buff *skb)
> +static int __xfrm6_output(struct sk_buff *skb)
>  {
>  	return NF_HOOK(NFPROTO_IPV6, NF_INET_POST_ROUTING, skb, NULL,
>  		       skb_dst(skb)->dev, xfrm6_output_finish);
>  }
> +
> +int xfrm6_output(struct sk_buff *skb)
> +{
> +	if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) ||
> +		dst_allfrag(skb_dst(skb))) {
> +			return ip6_fragment(skb, __xfrm6_output);
> +	}
> +	return __xfrm6_output(skb);
> +}

Oops, I didn't notice this the first time around.  The fragmentation
call should occur after POST_ROUTING.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2010-12-15  0:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14 18:32 [PATCHv2] fragment locally-generated IPsec6 packets that need it David L Stevens
2010-12-15  0:59 ` Herbert Xu [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=20101215005941.GA20448@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=dlstevens@us.ibm.com \
    --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