netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GRO/GSO hiding PMTU?
@ 2011-02-10 22:55 David Miller
  2011-02-10 23:07 ` David Miller
  2011-02-10 23:50 ` Herbert Xu
  0 siblings, 2 replies; 10+ messages in thread
From: David Miller @ 2011-02-10 22:55 UTC (permalink / raw)
  To: herbert; +Cc: netdev, netfilter-devel


I was trying to setup something simple to trigger PMTU to test my
PMTU patches, and the simplest (I thought) would be to simply down
the mtu of the internet facing side of my simple NAT box.

All I did was "ip link set eth0 mtu 1400", and try to send large
TCP sequences from inside.

To my surprise I saw no ICMP messages, on input to the NAT machine the
TCP packets had length 1448 and on output they had length 1348.

This NAT box has TG3 on both input and output, so supports GRO and
TSO.  The kernel is 2.6.34-rc7 vintage :-)

I suspect that the packet arrives on eth1, accumulates into GRO, and
thus marked as GSO as well, then GSO/TSO on output to eth0 is
re-segmenting things transparently, and we're not getting the ICMP
frag-needed message and the packet drop because of the skb_is_gso()
check in ip_forward().

	if (unlikely(skb->len > dst_mtu(&rt->dst) && !skb_is_gso(skb) &&
		     (ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) {
		IP_INC_STATS(dev_net(rt->dst.dev), IPSTATS_MIB_FRAGFAILS);
		icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
			  htonl(dst_mtu(&rt->dst)));
		goto drop;
	}

So if that's what is happening, that's cute, but I think we need to
fix this :-)

Perhaps the check in ip_forward() should instead validate the gso_size
in the skb_is_gso() case?

That'd be a little tricky since gso_size is an MSS value whereas what
we're checking against (skb->len) is the full packet size, headers and
all.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-02-11  7:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10 22:55 GRO/GSO hiding PMTU? David Miller
2011-02-10 23:07 ` David Miller
2011-02-11  0:07   ` Herbert Xu
2011-02-10 23:50 ` Herbert Xu
2011-02-11  6:22   ` David Miller
2011-02-11  6:35     ` David Miller
2011-02-11  6:41       ` Herbert Xu
2011-02-11  7:06         ` David Miller
2011-02-11  6:37     ` Herbert Xu
2011-02-11  7:07       ` David Miller

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