Bug 2015623

Summary: mptcpize fails to force mptcp usage on some programs
Product: Red Hat Enterprise Linux 9 Reporter: Paolo Abeni <pabeni>
Component: mptcpdAssignee: Davide Caratti <dcaratti>
Status: CLOSED ERRATA QA Contact: xmu
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: chorn, dcaratti, xmu
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mptcpd-0.8-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 12:54:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paolo Abeni 2021-10-19 16:52:22 UTC
mptcpize run <command>

fails if <command> uses 'socket(AF_INET, SOCK_STREAM, IPPROTO_IP)' instead of 
'socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)'

mptcpize enable <unit>

fails if the /tmp directory is located on a different fs WRT the unit file itself.

Solved by the following upstream commits:

commit 591b3b168d949c45d5b5994332a3007767845434
Author: Paolo Abeni <paolo.abeni>
Date:   Thu Oct 14 05:05:54 2021 +0200

    mptcpize: use explicit file copy instead of rename() (#161)

commit 5633f08e35552295b2f9414ff32ca4e8e081b2f2
Author: Paolo Abeni <paolo.abeni>
Date:   Tue Oct 12 19:24:33 2021 +0200

    mptcpize: force MPTCP usage for IPPROTO_IP, too (#159)

Comment 1 Davide Caratti 2021-11-29 14:04:48 UTC
*** Bug 2027232 has been marked as a duplicate of this bug. ***

Comment 2 Davide Caratti 2021-11-29 15:56:15 UTC
@xmu, this can be verified by looking whether the listening socket got the TCP_ULP attached. See below:


# mptcpize run  ncat -l 0.0.0.0 1234 &
# ss -santi | grep -A1 1234
LISTEN 0      10           0.0.0.0:1234       0.0.0.0:*
  cubic cwnd:10 tcp-ulp-mptcp flags:m token:0000(id:0)/0000(id:0) seq:0 sfseq:0 ssnoff:0 maplen:0


<ctrl+c>

# mptcpize run  iperf3 -s -p 1234  &
# ss -santi | grep -A1 1234
LISTEN 0      4096               *:1234             *:*
   cubic cwnd:10

I'm in the progress of doing a build that backports a fix for this problem, so MPTCP testing with native applications will be much easier. I see you provided 'qa_ack+', can you please set a value >= 16 for the ITM? thanks!

Comment 3 xmu 2021-11-30 02:57:47 UTC
set ITM18

Comment 4 Christian Horn 2021-12-01 05:52:38 UTC
> Fixed In Version: mptcpd-0.8-2.el9
Fixes the issue works for me, tnx

Comment 5 xmu 2021-12-01 10:26:03 UTC
case /kernel/networking/mptcp/mptcpd/mptcpd_commands pass with  mptcpd-0.8-2.el9 and kernel-5.14.0-21.el9.x86_64

Comment 9 xmu 2021-12-01 11:29:10 UTC
Hi Davide,
  I tested "mptcpize run" fololowed comment #2, 
  how to test "mptcp enable" for patch "mptcpize: use explicit file copy instead of rename()"?
  Thanks

Comment 10 Davide Caratti 2021-12-02 08:45:23 UTC
hello Xiumei, thanks for confirming!

(In reply to xmu from comment #9)
> Hi Davide,
>   I tested "mptcpize run" fololowed comment #2, 
>   how to test "mptcp enable" for patch "mptcpize: use explicit file copy
> instead of rename()"?
>   Thanks

I *think* it should be sufficient to mptcpize a command that is in '/tmp' rather than '/usr/bin'. On mptcpd-0.8-1.el9 that should fail to mptcpize.

Comment 13 errata-xmlrpc 2022-05-17 12:54:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: mptcpd), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2417