• Geliang Tang's avatar
    mptcp: add port number check for MP_JOIN · 5bc56388
    Geliang Tang authored
    This patch adds two new helpers, subflow_use_different_sport and
    subflow_use_different_dport, to check whether the subflow's source or
    destination port number is different from the msk's port number. When
    receiving the MP_JOIN's SYN/SYNACK/ACK, we do these port number checks
    and print out the different port numbers.
    
    And furthermore, when receiving the MP_JOIN's SYN/ACK, we also use a new
    helper mptcp_pm_sport_in_anno_list to check whether this port number is
    announced. If it isn't, we need to abort this connection.
    
    This patch also populates the local address's port field in
    local_address.
    Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
    Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    5bc56388
protocol.h 22.4 KB