All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Changli Gao <xiaosuo@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Bart De Schuymer <bdschuym@pandora.be>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] ip_fragment: fix subtracting PPPOE_SES_HLEN from mtu twice
Date: Mon, 02 Aug 2010 17:50:57 +0200	[thread overview]
Message-ID: <4C56E961.9070107@trash.net> (raw)
In-Reply-To: <1280618708-9241-1-git-send-email-xiaosuo@gmail.com>

On 01.08.2010 01:25, Changli Gao wrote:
> 6c79bf0f2440fd250c8fce8d9b82fcf03d4e8350 subtracts PPPOE_SES_HLEN from mtu at
> the front of ip_fragment(). So the later subtraction should be removed. The
> MTU of 802.1q is also 1500, so MTU should not be changed.

Bart, please review, thanks.

> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> ----
>  net/ipv4/ip_output.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
> index 6652bd9..04b6989 100644
> --- a/net/ipv4/ip_output.c
> +++ b/net/ipv4/ip_output.c
> @@ -446,7 +446,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
>  	int ptr;
>  	struct net_device *dev;
>  	struct sk_buff *skb2;
> -	unsigned int mtu, hlen, left, len, ll_rs, pad;
> +	unsigned int mtu, hlen, left, len, ll_rs;
>  	int offset;
>  	__be16 not_last_frag;
>  	struct rtable *rt = skb_rtable(skb);
> @@ -585,9 +585,7 @@ slow_path:
>  	/* for bridged IP traffic encapsulated inside f.e. a vlan header,
>  	 * we need to make room for the encapsulating header
>  	 */
> -	pad = nf_bridge_pad(skb);
> -	ll_rs = LL_RESERVED_SPACE_EXTRA(rt->dst.dev, pad);
> -	mtu -= pad;
> +	ll_rs = LL_RESERVED_SPACE_EXTRA(rt->dst.dev, nf_bridge_pad(skb));
>  
>  	/*
>  	 *	Fragment the datagram.
> 


  reply	other threads:[~2010-08-02 15:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-31 23:25 [PATCH] ip_fragment: fix subtracting PPPOE_SES_HLEN from mtu twice Changli Gao
2010-08-02 15:50 ` Patrick McHardy [this message]
2010-08-02 19:20   ` Bart De Schuymer
2010-08-03  0:25     ` 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=4C56E961.9070107@trash.net \
    --to=kaber@trash.net \
    --cc=bdschuym@pandora.be \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=xiaosuo@gmail.com \
    /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.