Add option to change remote syslog protocol to TCP, which is more reliable than UDP, but might be unsupported on older syslog servers.
Signed-off-by: Peter Müller peter.mueller@link38.eu --- html/cgi-bin/logs.cgi/config.dat | 16 ++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/html/cgi-bin/logs.cgi/config.dat b/html/cgi-bin/logs.cgi/config.dat index 789341dbe..ec3c2a92d 100644 --- a/html/cgi-bin/logs.cgi/config.dat +++ b/html/cgi-bin/logs.cgi/config.dat @@ -33,6 +33,7 @@ $logsettings{'LOGWATCH_KEEP'} = '56'; my @VS = ('15','50','100','150','250','500'); $logsettings{'ENABLE_REMOTELOG'} = 'off'; $logsettings{'REMOTELOG_ADDR'} = ''; +$logsettings{'REMOTELOG_PROTOCOL'} = 'udp'; $logsettings{'ACTION'} = ''; &Header::getcgihash(%logsettings);
@@ -45,6 +46,10 @@ if ($logsettings{'ACTION'} eq $Lang::tr{'save'}) { $errormessage = $Lang::tr{'invalid logserver address'}; } + unless ($logsettings{'REMOTELOG_PROTOCOL'} =~ /^udp|tcp$/) + { + + } } unless ($logsettings{'LOGWATCH_KEEP'} =~ /^\d+$/) { @@ -69,6 +74,10 @@ $checked{'ENABLE_REMOTELOG'}{'off'} = ''; $checked{'ENABLE_REMOTELOG'}{'on'} = ''; $checked{'ENABLE_REMOTELOG'}{$logsettings{'ENABLE_REMOTELOG'}} = "checked='checked'";
+$selected{'REMOTELOG_PROTOCOL'}{'udp'} = ''; +$selected{'REMOTELOG_PROTOCOL'}{'tcp'} == ''; +$selected{'REMOTELOG_PROTOCOL'}{$logsettings{'REMOTELOG_PROTOCOL'}} = "selected='selected'"; + $checked{'LOGVIEW_REVERSE'}{'off'} = ''; $checked{'LOGVIEW_REVERSE'}{'on'} = ''; $checked{'LOGVIEW_REVERSE'}{$logsettings{'LOGVIEW_REVERSE'}} = "checked='checked'"; @@ -139,6 +148,11 @@ print <<END <tr> <td class='base'>$Lang::tr{'enabled'}</td><td><input type='checkbox' name='ENABLE_REMOTELOG' $checked{'ENABLE_REMOTELOG'}{'on'} /></td> <td>$Lang::tr{'log server address'}</td><td><input type='text' name='REMOTELOG_ADDR' value='$logsettings{'REMOTELOG_ADDR'}' /></td> + <td>$Lang::tr{'log server protocol'}</td><td> + <select name='REMOTELOG_PROTOCOL'> + <option value='udp' $selected{'REMOTELOG_PROTOCOL'}{'udp'}>$Lang::tr{'udp less overhead'}</option> + <option value='tcp' $selected{'REMOTELOG_PROTOCOL'}{'tcp'}>$Lang::tr{'tcp more reliable'}</option> + </select></td> </tr> </table> END