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]
Message-ID: <1387316079.19078.291.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Tue, 17 Dec 2013 13:34:39 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc:	Michal Schmidt <mschmidt@...hat.com>,
	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] ipv6: sit: update mtu check to take care of gso packets

On Tue, 2013-12-17 at 21:19 +0100, Hannes Frederic Sowa wrote:
> Hi Eric!
> 
> On Mon, Dec 16, 2013 at 06:31:23AM -0800, Eric Dumazet wrote:
> > In the future, we probably want to extend the MTU check to do the
> > right thing for GSO packets...
> 
> How could that look like?

I think I already posted a draft for this.

Idea would be to have a helper to compute the mtu of each segment :

static inline unsigned int gso_size_with_headers(const struct sk_buff *skb)
{
       unsigned int hdrlen = skb_transport_header(skb) - skb_network_header(skb);

       if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
               hdrlen += tcp_hdrlen(skb);
       else
               hdrlen += 8; // sizeof(struct udphdr)

       return skb_shinfo(skb)->gso_size + hdrlen;
}

...

       len = skb_is_gso(skb) ? gso_size_with_headers(skb) : skb->len;

       if (unlikely(len > dst_mtu(&rt->dst) && ...



--
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