Hi Mat, Thank you for the patch! On 09/05/2019 19:06, Mat Martineau wrote: > The SACK code would potentially add four bytes to the expected > TCP option size even if all option space was already used. > > Signed-off-by: Mat Martineau > --- > net/ipv4/tcp_output.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c > index 12c9e8ebc86d..1cd915890ce5 100644 > --- a/net/ipv4/tcp_output.c > +++ b/net/ipv4/tcp_output.c > @@ -814,6 +814,9 @@ static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb > } > } > > + if (size + TCPOLEN_SACK_BASE_ALIGNED >= MAX_TCP_OPTION_SPACE) > + return size; > + Should we not add this check in the "if" block here below... > eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack; > if (unlikely(eff_sacks)) { > const unsigned int remaining = MAX_TCP_OPTION_SPACE - size; ... to use this "remaining" variable only if we want to add SACKS: if (TCPOLEN_SACK_BASE_ALIGNED >= remaining) return size; Do you want me to squash this fix in Peter's commit (mptcp: Handle MP_CAPABLE options for outgoing connections) or to add it as a new commit just after Peter's one? (It's only to ease the "rebasing" task later by helping doing a maximum now as long as I can help :) ) Cheers, Matt -- Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium