lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Jul 2013 15:24:59 -0700
From:	Pravin Shelar <pshelar@...ira.com>
To:	Alexander Duyck <alexander.h.duyck@...el.com>
Cc:	netdev@...r.kernel.org, eric.dumazet@...il.com, jesse@...ira.com,
	davem@...emloft.net
Subject: Re: [PATCH net] gre: Fix MTU sizing check for gretap tunnels

On Thu, Jul 11, 2013 at 1:12 PM, Alexander Duyck
<alexander.h.duyck@...el.com> wrote:
> This change fixes an MTU sizing issue seen with gretap tunnels when non-gso
> packets are sent from the interface.
>
> In my case I was able to reproduce the issue by simply sending a ping of
> 1421 bytes with the gretap interface created on a device with a standard
> 1500 mtu.
>
> This fix is based on the fact that the tunnel mtu is already adjusted by
> dev->hard_header_len so it would make sense that any packets being compared
> against that mtu should also be adjusted by hard_header_len and the tunnel
> header instead of just the tunnel header.
>
we can simplify code by not doing dev->hard_header_len adjustment to tunnel-mtu.

And right thing would be adjusting tunnel-mtu according to rt->dst.dev
header-len so that we get mtu for out going path.

> Signed-off-by: Alexander Duyck <alexander.h.duyck@...el.com>
> ---
>
>  net/ipv4/ip_tunnel.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
> index 945734b..ca1cb2d 100644
> --- a/net/ipv4/ip_tunnel.c
> +++ b/net/ipv4/ip_tunnel.c
> @@ -476,7 +476,7 @@ static int tnl_update_pmtu(struct net_device *dev, struct sk_buff *skb,
>                             struct rtable *rt, __be16 df)
>  {
>         struct ip_tunnel *tunnel = netdev_priv(dev);
> -       int pkt_size = skb->len - tunnel->hlen;
> +       int pkt_size = skb->len - tunnel->hlen - dev->hard_header_len;
>         int mtu;
>
>         if (df)
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ