From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: [PATCH 2/3 v4] allow changing remote syslog protocol to TCP Date: Mon, 20 Nov 2017 19:40:17 +0100 Message-ID: <20171120194017.5d10d634.peter.mueller@link38.eu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2514424183374041703==" List-Id: --===============2514424183374041703== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=C3=BCller --- html/cgi-bin/logs.cgi/config.dat | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/html/cgi-bin/logs.cgi/config.dat b/html/cgi-bin/logs.cgi/config.= dat index 789341dbe..aed0db9cf 100644 --- a/html/cgi-bin/logs.cgi/config.dat +++ b/html/cgi-bin/logs.cgi/config.dat @@ -33,6 +33,7 @@ $logsettings{'LOGWATCH_KEEP'} =3D '56'; my @VS =3D ('15','50','100','150','250','500'); $logsettings{'ENABLE_REMOTELOG'} =3D 'off'; $logsettings{'REMOTELOG_ADDR'} =3D ''; +$logsettings{'REMOTELOG_PROTOCOL'} =3D 'udp'; $logsettings{'ACTION'} =3D ''; &Header::getcgihash(\%logsettings); =20 @@ -45,6 +46,10 @@ if ($logsettings{'ACTION'} eq $Lang::tr{'save'}) { $errormessage =3D $Lang::tr{'invalid logserver address'}; } + unless ($logsettings{'REMOTELOG_PROTOCOL'} =3D~ /^udp|tcp$/) + { + $errormessage =3D $Lang::tr{'invalid logserver protocol'}; + } } unless ($logsettings{'LOGWATCH_KEEP'} =3D~ /^\d+$/) { @@ -69,6 +74,10 @@ $checked{'ENABLE_REMOTELOG'}{'off'} =3D ''; $checked{'ENABLE_REMOTELOG'}{'on'} =3D ''; $checked{'ENABLE_REMOTELOG'}{$logsettings{'ENABLE_REMOTELOG'}} =3D "checked= =3D'checked'"; =20 +$selected{'REMOTELOG_PROTOCOL'}{'udp'} =3D ''; +$selected{'REMOTELOG_PROTOCOL'}{'tcp'} =3D=3D ''; +$selected{'REMOTELOG_PROTOCOL'}{$logsettings{'REMOTELOG_PROTOCOL'}} =3D "sel= ected=3D'selected'"; + $checked{'LOGVIEW_REVERSE'}{'off'} =3D ''; $checked{'LOGVIEW_REVERSE'}{'on'} =3D ''; $checked{'LOGVIEW_REVERSE'}{$logsettings{'LOGVIEW_REVERSE'}} =3D "checked=3D= 'checked'"; @@ -139,6 +148,11 @@ print < $Lang::tr{'enabled'} $Lang::tr{'log server address'} + $Lang::tr{'log server protocol'} + END --=20 2.13.6 --===============2514424183374041703==--