Skip to content

Commit

Permalink
don't shorten the hostname for wireguard.pl if it is a IPv4 address (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
VVelox authored Jul 10, 2024
1 parent eafd341 commit 5cc135a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snmp/wireguard.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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/\..*$//;
}
}
Expand Down

0 comments on commit 5cc135a

Please sign in to comment.