mirror of
https://github.com/max-moser/network-manager-wireguard.git
synced 2026-11-23 01:35:39 +03:00
Change Listen Port from a required parameter to an optional parameter as specified in the 'wg' man page.
This commit is contained in:
1 parent
f2689562b6
commit
46c531eb95
2 files changed
+9
-16
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user