From 6baa920b28ac83a50fe54aa921fabb2f328e1907 Mon Sep 17 00:00:00 2001 From: Evan Forbes <42654277+evan-forbes@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:40:43 -0500 Subject: [PATCH] feat: add command to enable mptcp (#4014) ## Overview adds a makefile command to enable and disable mptcp over different ports (not interfaces) for linux kernels greater than 5.6 not required, but potentially useful (cherry picked from commit 808d0f21baf7900e30e4f42345ee09d4bc34e388) # Conflicts: # Makefile --- Makefile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Makefile b/Makefile index d651881cf3..050dfc47e7 100644 --- a/Makefile +++ b/Makefile @@ -250,3 +250,40 @@ enable-bbr: echo "BBR is already enabled."; \ fi .PHONY: enable-bbr +<<<<<<< HEAD +======= + +## enable-mptcp: Enable mptcp over multiple ports (not interfaces). Only works on Linux Kernel 5.6 and above. +enable-mptcp: + @echo "Configuring system to use mptcp..." + @sudo sysctl -w net.mptcp.enabled=1 + @sudo sysctl -w net.mptcp.mptcp_path_manager=ndiffports + @sudo sysctl -w net.mptcp.mptcp_ndiffports=16 + @echo "Making MPTCP settings persistent across reboots..." + @echo "net.mptcp.enabled=1" | sudo tee -a /etc/sysctl.conf + @echo "net.mptcp.mptcp_path_manager=ndiffports" | sudo tee -a /etc/sysctl.conf + @echo "net.mptcp.mptcp_ndiffports=16" | sudo tee -a /etc/sysctl.conf + @echo "MPTCP configuration complete and persistent!" + +.PHONY: enable-mptcp + +## disable-mptcp: Disables mptcp over multiple ports. Only works on Linux Kernel 5.6 and above. +disable-mptcp: + @echo "Disabling MPTCP..." + @sudo sysctl -w net.mptcp.enabled=0 + @sudo sysctl -w net.mptcp.mptcp_path_manager=default + @echo "Removing MPTCP settings from /etc/sysctl.conf..." + @sudo sed -i '/net.mptcp.enabled=1/d' /etc/sysctl.conf + @sudo sed -i '/net.mptcp.mptcp_path_manager=ndiffports/d' /etc/sysctl.conf + @sudo sed -i '/net.mptcp.mptcp_ndiffports=16/d' /etc/sysctl.conf + @echo "MPTCP configuration reverted!" + +.PHONY: disable-mptcp + +## debug-version: Print the git tag and version. +debug-version: + @echo "GIT_TAG: $(GIT_TAG)" + @echo "VERSION: $(VERSION)" +.PHONY: debug-version + +>>>>>>> 808d0f21 (feat: add command to enable mptcp (#4014))