From 5cc135a8366eaa0395737062f43ba51e55527928 Mon Sep 17 00:00:00 2001 From: "Zane C. Bowers-Hadley" Date: Wed, 10 Jul 2024 14:27:32 -0500 Subject: [PATCH] don't shorten the hostname for wireguard.pl if it is a IPv4 address (#536) --- snmp/wireguard.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snmp/wireguard.pl b/snmp/wireguard.pl index 49e0c0ec6..45f6c01a8 100755 --- a/snmp/wireguard.pl +++ b/snmp/wireguard.pl @@ -520,7 +520,7 @@ sub hosts { delete( $wg_info{$interface}{$pubkey}{name} ); } else { $name = $wg_info{$interface}{$pubkey}{hostname}; - if ( $config->{use_short_hostname} ) { + if ( $config->{use_short_hostname} && $name !~ /^[0-9\.]+$/) { $name =~ s/\..*$//; } }