[server] Add MAX_FW_TIMEOUT to access.conf variables.

[server] Add MAX_FW_TIMEOUT to access.conf stanzas to allow a
maximum number of seconds for client-specified timeouts in SPA packets.
This fixes issue #226 which was spotted by Jeremiah Rothschild.
This commit is contained in:
Michael Rash
2016-09-29 22:18:13 -04:00
parent 330edaed63
commit f5509bcd0c
6 changed files with 91 additions and 3 deletions
+36
View File
@@ -4058,6 +4058,42 @@
],
'positive_output_matches' => [qr/not\sin\srange/],
},
{
'category' => 'basic operations',
'subcategory' => 'server',
'detail' => 'invalid MAX_FW_TIMEOUT',
'function' => \&server_conf_files,
'fwknopd_cmdline' => $server_rewrite_conf_files,
'exec_err' => $YES,
'server_access_file' => [
'SOURCE any',
'KEY testtest',
'MAX_FW_TIMEOUT 999999999999'
],
'server_conf_file' => [
'### comment'
],
'positive_output_matches' => [qr/not\sin\srange/],
},
{
'category' => 'basic operations',
'subcategory' => 'server',
'detail' => 'MAX_FW_TIMEOUT < FW_ACCESS_TIMEOUT',
'function' => \&server_conf_files,
'fwknopd_cmdline' => "$server_rewrite_conf_files --dump-config",
'exec_err' => $NO,
'server_access_file' => [
'SOURCE any',
'KEY testtest',
'FW_ACCESS_TIMEOUT 30',
'MAX_FW_TIMEOUT 20'
],
'server_conf_file' => [
'### comment'
],
'positive_output_matches' => [qr/honoring\sMAX_FW_TIMEOUT/],
},
{
'category' => 'basic operations',
'subcategory' => 'server',