Permalink
Browse files

Patch for IPv6 NIC result

  • Loading branch information...
NEMS Linux
NEMS Linux committed Dec 17, 2018
1 parent 7f7d112 commit 4629f653810773b8eca0101cb209a23879c71cec
Showing with 1 addition and 1 deletion.
  1. +1 −1 info.sh
@@ -21,7 +21,7 @@ elif [[ $COMMAND == "nic" ]]; then
# NEW way (20181201) tests the route based on $host and treats that as the interface
host=google.com
host_ip=$(getent ahosts "$host" | awk '{print $1; exit}')
interface=`ip route get "$host_ip" | grep -Po '(?<=(dev )).*(?= src| proto)'`
interface=`ip route get "$host_ip" | grep -Po '(?<=(dev )).*(?= src| proto)' | cut -f 1 -d " "`
echo $interface

elif [[ $COMMAND == "checkport" ]]; then

0 comments on commit 4629f65

Please sign in to comment.