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:
parent
89e18e1fcf
commit
d019485836
1 changed files with 8 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue