Browse Source

[fix] Bad way to get interface name

ljf (zamentur) 3 years ago
parent
commit
036111336b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      conf/hook_post-iptable-rules

+ 1 - 1
conf/hook_post-iptable-rules

@@ -13,7 +13,7 @@ for i in ${server_names}; do
   fi
 done
 
-interface=$(ip route | awk '/default via/ { print $NF; }')
+interface=$(ip route | awk '/default via/ { print $5; }')
 dns=$(grep -o -P '\s*nameserver\s+\K[ABCDEFabcdef\d.:]+' /etc/resolv.dnsmasq.conf)
 
 # IPv6