Change Listen Port from a required parameter to an optional parameter as specified in the 'wg' man page.

This commit is contained in:
Druco committed 2018-07-16 17:53:03 -07:00
1 parent f2689562b6
commit 46c531eb95
2 files changed
+9 -16

No files matched your search

+5
View File
@@ -127,6 +127,11 @@ check_peer_public_key(const char *str){
static gboolean
check_interface_listen_port(const char *str)
{
// Listen port is not a required field according to man wg
if(is_empty(str)){
return TRUE;
}
if(!g_ascii_string_to_unsigned(str, 10, 0, 65535, NULL, NULL)){
return FALSE;
}