]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: call tcp_rate_skb_sent() when retransmit with unaligned skb->data
authorYousuk Seung <ysseung@google.com>
Tue, 24 Oct 2017 23:44:42 +0000 (16:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Oct 2017 08:47:55 +0000 (17:47 +0900)
commitcd90c2e5f1a9f8be3dd8efb999d17799f210aeb7
tree6acbd5d5fbf960b0c07d1899aa42c30acf51790a
parent5627fc3e36ca4650a50a2ee0f9faa9249bf0d107
tcp: call tcp_rate_skb_sent() when retransmit with unaligned skb->data

Current implementation calls tcp_rate_skb_sent() when tcp_transmit_skb()
is called when it clones skb only. Not calling tcp_rate_skb_sent() is OK
for all such code paths except from __tcp_retransmit_skb() which happens
when skb->data address is not aligned. This may rarely happen e.g. when
small amount of data is sent initially and the receiver partially acks
odd number of bytes for some reason, possibly malicious.

Signed-off-by: Yousuk Seung <ysseung@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c