Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Dec 20, 2023
1 parent 57a0cf4 commit 437436c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mptcp/files/usr/bin/multipath
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ else
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}')
ID=$(ip mptcp endpoint show | sort | grep -m 1 -E "dev $DEVICE " | awk '{print $3}')
IFF=$(ip mptcp endpoint show | sort | grep -m 1 -E "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')
[ -f /usr/bin/jsonfilter ] && IP=$(ip -j a show $DEVICE | jsonfilter -e '@[0].addr_info[*].local')
[ -f /usr/bin/jq ] && IP=$(ip -j a show $DEVICE | jq -r '.[0].addr_info[].local')
[ -z "$ID" ] && [ -n "$IP" ] && ID=$(ip mptcp endpoint show | grep "$IP" | awk '{print $3}')
[ -z "$ID" ] && [ -n "$IP" ] && ID=$(ip mptcp endpoint show | grep "$IP " | awk '{print $3}')
RMID=$(ip mptcp endpoint show | grep '::ffff' | awk '{ print $3 }')
[ -n "$RMID" ] && ip mptcp endpoint delete id $RMID 2>&1 >/dev/null
case $TYPE in
Expand Down

0 comments on commit 437436c

Please sign in to comment.