1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Remove if* interface in MPTCP

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-09-05 10:10:01 +02:00
parent 89e18e1fcf
commit d019485836

View file

@ -131,6 +131,14 @@ if [ -f /proc/sys/net/mptcp/mptcp_enabled ]; then
printf "0x%02x" $(($(($IFF^$(($IFF&$IFF_MASK))))|$FLAG)) > $FLAG_PATH
else
# Remove not needed if* interfaces in MPTCP
oldintfs=$(ip mptcp endpoint show | grep "dev eth" | awk '{ print $3 }')
[ -n "$oldintfs" ] && {
for oldintf in $oldintfs; do
ip mptcp endpoint delete id $oldintf 2>&1 >/dev/null
done
}
ID=$(ip mptcp endpoint show | grep -m 1 "dev $DEVICE" | awk '{print $3}')
IFF=$(ip mptcp endpoint show | grep -m 1 "dev $DEVICE" | awk '{print $4}')
IP=$(ip a show $DEVICE | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')