• Matthieu Baerts (NGI0)'s avatar
    mptcp: pm: reset MPC endp ID when re-added · dce1c6d1
    Matthieu Baerts (NGI0) authored
    The initial subflow has a special local ID: 0. It is specific per
    connection.
    
    When a global endpoint is deleted and re-added later, it can have a
    different ID -- most services managing the endpoints automatically don't
    force the ID to be the same as before. It is then important to track
    these modifications to be consistent with the ID being used for the
    address used by the initial subflow, not to confuse the other peer or to
    send the ID 0 for the wrong address.
    
    Now when removing an endpoint, msk->mpc_endpoint_id is reset if it
    corresponds to this endpoint. When adding a new endpoint, the same
    variable is updated if the address match the one of the initial subflow.
    
    Fixes: 3ad14f54 ("mptcp: more accurate MPC endpoint tracking")
    Cc: stable@vger.kernel.org
    Reviewed-by: default avatarMat Martineau <martineau@kernel.org>
    Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    dce1c6d1
pm_netlink.c 62.1 KB