Skip to content

Commit

Permalink
need to strip trailing space on adapter name
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex authored Mar 10, 2020
1 parent 8f2aeaf commit 6774969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run/root/iptable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi
# identify docker bridge interface name by looking at routing to
# vpn provider remote endpoint (first ip address from name
# lookup in /root/start.sh)
docker_interface=$(ip route show to match "${remote_dns_answer_first}" | grep -P -o -m 1 '[a-zA-Z0-9]+\s?+$')
docker_interface=$(ip route show to match "${remote_dns_answer_first}" | grep -P -o -m 1 '[a-zA-Z0-9]+\s?+$' | tr -d '[:space:]')
if [[ "${DEBUG}" == "true" ]]; then
echo "[debug] Docker interface defined as ${docker_interface}"
fi
Expand Down

0 comments on commit 6774969

Please sign in to comment.