]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
tcp: avoid fragmenting peculiar skbs in SACK
authorYuchung Cheng <ycheng@google.com>
Thu, 11 May 2017 00:01:27 +0000 (17:01 -0700)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 27 Jun 2017 13:16:15 +0000 (10:16 -0300)
commit15ad8fbd7911fcaae3daa854eacea63a492124dc
tree43fd5440b402a83b13e0e12f22bef86abceb31db
parentd0a435b88681228786f2c8ba56404e37b4372c48
tcp: avoid fragmenting peculiar skbs in SACK

BugLink: http://bugs.launchpad.net/bugs/1697001
[ Upstream commit b451e5d24ba6687c6f0e7319c727a709a1846c06 ]

This patch fixes a bug in splitting an SKB during SACK
processing. Specifically if an skb contains multiple
packets and is only partially sacked in the higher sequences,
tcp_match_sack_to_skb() splits the skb and marks the second fragment
as SACKed.

The current code further attempts rounding up the first fragment
to MSS boundaries. But it misses a boundary condition when the
rounded-up fragment size (pkt_len) is exactly skb size.  Spliting
such an skb is pointless and causses a kernel warning and aborts
the SACK processing. This patch universally checks such over-split
before calling tcp_fragment to prevent these unnecessary warnings.

Fixes: adb92db857ee ("tcp: Make SACK code to split only at mss boundaries")
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
net/ipv4/tcp_input.c