if (&Network::check_ip_address($address)) {
# nothing
+ # Check if we have a valid FQDN
+ } elsif (&General::validfqdn($address)) {
+ # nothing
+
# Otherwise this fails
} else {
push(@errormessages, $Lang::tr{'invalid endpoint address'});
# Check the endpoint address
if ($cgiparams{'ENDPOINT_ADDRESS'} eq '') {
# The endpoint address may be empty
- } elsif (!&Network::check_ip_address($cgiparams{'ENDPOINT_ADDRESS'})) {
+ } elsif (&General::validfqdn($cgiparams{'ENDPOINT_ADDRESS'})) {
+ # The endpoint is a valid FQDN
+ } elsif (&Network::check_ip_address($cgiparams{'ENDPOINT_ADDRESS'})) {
+ # The endpoint is a valid IP address
+ } else {
push(@errormessages, $Lang::tr{'wg invalid endpoint address'});
}