We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bc794a commit 9714161Copy full SHA for 9714161
func/ip.sh
@@ -31,7 +31,9 @@ is_ip_rdns_valid() {
31
local awk_ip=$(echo $network_ip | sed 's|\.|/\&\&/|g')
32
local rev_awk_ip=$(echo $awk_ip | rev)
33
34
- [ -z "$rdns" ] && local rdns=$(dig +short -x $ip | head -n 1 | sed 's/.$//')
+ if [ -z "$rdns" ]; then
35
+ local rdns=$(dig +short -x "$ip" | head -n 1 | sed 's/.$//') || unset rdns
36
+ fi
37
38
if [ ! -z "$rdns" ] && [ ! $(echo $rdns | awk "/$awk_ip/ || /$rev_awk_ip/") ]; then
39
echo $rdns
0 commit comments