Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
}
# Check the endpoint address
- unless (&Network::check_ip_address($cgiparams{'ENDPOINT_ADDRESS'})) {
+ if ($cgiparams{'ENDPOINT_ADDRESS'} eq '') {
+ # The endpoint address may be empty
+ } elsif (!&Network::check_ip_address($cgiparams{'ENDPOINT_ADDRESS'})) {
push(@errormessages, $Lang::tr{'wg invalid endpoint address'});
}
<td>
<input type="text" name="ENDPOINT_ADDRESS"
- value="$cgiparams{'ENDPOINT_ADDRESS'}" required />
+ value="$cgiparams{'ENDPOINT_ADDRESS'}" />
</td>
</tr>