mptcp: fix 'use_ack' option access.
authorPaolo Abeni <pabeni@redhat.com>
Thu, 30 Apr 2020 13:01:54 +0000 (15:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Apr 2020 19:23:22 +0000 (12:23 -0700)
The mentioned RX option field is initialized only for DSS
packet, we must access it only if 'dss' is set too, or
the subflow will end-up in a bad status, leading to
RFC violations.

Fixes: d22f4988ffec ("mptcp: process MP_CAPABLE data option")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/options.c

index ecf41d52d2fc48d8e7ef73595e966ddea8196ef1..9486720c325663cc3258de4fcbafed05a30331ea 100644 (file)
@@ -695,7 +695,7 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *sk,
        if (TCP_SKB_CB(skb)->seq != subflow->ssn_offset + 1)
                return subflow->mp_capable;
 
-       if (mp_opt->use_ack) {
+       if (mp_opt->dss && mp_opt->use_ack) {
                /* subflows are fully established as soon as we get any
                 * additional ack.
                 */