Skip to content

New MPTCP connections won't be created if there's no connectivity on primary subflow #593

@arinc9

Description

@arinc9

Pre-requisites

  • A similar issue has not been reported before.
  • mptcp.dev website does not cover my case.
  • An up-to-date kernel is being used.
  • This case is not fixed with the latest stable (or LTS) version listed on kernel.org

What did you do?

Client device setup: Client device runs a proxy programme. The TCP traffic of the computer behind the client device is proxied to 102.132.201.141 using MPTCP.

$ uname -r
6.6.96

$ ip r
default via 192.168.65.1 dev eth1 proto static src 192.168.65.161 metric 1 
default dev qmimux0 proto static scope link src 100.127.48.95 metric 3 
[...]

$ ip mp e
192.168.65.161 id 1 subflow dev eth1 
100.127.48.95 id 2 subflow dev qmimux0 

Running iperf3 on a computer behind the client device:

iperf3 -c 102.132.201.141 --bind-dev enp7s0 -Z

MPTCP monitor running on client device: Working as expected.

$ ip mp m
[       CREATED] token=64f6b119 remid=0 locid=0 saddr4=192.168.65.161 daddr4=102.132.201.141 sport=34244 dport=31001
[   ESTABLISHED] token=64f6b119 remid=0 locid=0 saddr4=192.168.65.161 daddr4=102.132.201.141 sport=34244 dport=31001
[       CREATED] token=af201174 remid=0 locid=0 saddr4=192.168.65.161 daddr4=102.132.201.141 sport=34246 dport=31001
[   ESTABLISHED] token=af201174 remid=0 locid=0 saddr4=192.168.65.161 daddr4=102.132.201.141 sport=34246 dport=31001
[SF_ESTABLISHED] token=af201174 remid=0 locid=2 saddr4=100.127.48.95 daddr4=102.132.201.141 sport=45907 dport=31001 backup=0 ifindex=19
[SF_ESTABLISHED] token=64f6b119 remid=0 locid=2 saddr4=100.127.48.95 daddr4=102.132.201.141 sport=48649 dport=31001 backup=0 ifindex=19
[        CLOSED] token=64f6b119
[        CLOSED] token=af201174

Add this iptables rule on client device to simulate no connectivity on the second subflow:

iptables -t mangle -A PREROUTING -i qmimux0 -j DROP

MPTCP monitor running on client device: Expected operation, but the second TCP stream won't be reported as closed.

$ ip mp m
[       CREATED] token=0fa4dc43 remid=0 locid=0 saddr4=192.168.65.161 daddr4=102.132.201.141 sport=35594 dport=31001
[   ESTABLISHED] token=0fa4dc43 remid=0 locid=0 saddr4=192.168.65.161 daddr4=102.132.201.141 sport=35594 dport=31001
[       CREATED] token=6eba6bed remid=0 locid=0 saddr4=192.168.65.161 daddr4=102.132.201.141 sport=35610 dport=31001
[   ESTABLISHED] token=6eba6bed remid=0 locid=0 saddr4=192.168.65.161 daddr4=102.132.201.141 sport=35610 dport=31001
[        CLOSED] token=0fa4dc43
(It won't report CLOSED for 6eba6bed)

Add this iptables rule on client device to simulate no connectivity on the primary subflow:

iptables -t mangle -D PREROUTING -i qmimux0 -j DROP
iptables -t mangle -A PREROUTING -i eth1 -j DROP

MPTCP monitor running on client device: No CREATED or ESTABLISHED messages. Only CLOSED is reported after the TCP connection is terminated by iperf3.

[        CLOSED] token=faab2c24

iperf3 log:

iperf3: error - unable to receive control message - port may not be available, the other side may have stopped running, etc.: Connection reset by peer

The route that is at the top of the routing table list becomes the primary subflow for MPTCP. So deleting it as an endpoint won't change the behaviour.

$ ip mp e
192.168.65.161 id 1 subflow dev eth1 
100.127.48.95 id 2 subflow dev qmimux0 
$ ip mp e d i 1
$ ip mp e
100.127.48.95 id 2 subflow dev qmimux0 

Excerpt: New MPTCP connections should still be created when there's no connectivity on the primary subflow but there's connectivity on the remaining subflows. This could be implemented in a way that, when creating an MPTCP connection, a different endpoint should be used if the previous one times out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions