From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: Re: [PATCH 2/3 v3] allow changing remote syslog protocol to TCP Date: Mon, 20 Nov 2017 19:37:46 +0100 Message-ID: <20171120193746.68d370d0.peter.mueller@link38.eu> In-Reply-To: <1511192742.4838.539.camel@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2009510254451631226==" List-Id: --===============2009510254451631226== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, > On Sun, 2017-11-19 at 17:40 +0100, Peter M=C3=BCller wrote: > > Add option to change remote syslog protocol to TCP, which > > is more reliable than UDP, but might be unsupported on > > older syslog servers. > >=20 > > Signed-off-by: Peter M=C3=BCller > > --- > > html/cgi-bin/logs.cgi/config.dat | 16 ++++++++++++++ > > 1 file changed, 16 insertions(+) > >=20 > > 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'} =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$/) > > + { > > + > > + } =20 >=20 > So what was going to happen here? There should be an error message in case invalid formula data was received. Forgot the line, will send in another version of this. *sigh* Sorry for all the noise here. Best regards, Peter M=C3=BCller >=20 > > } > > 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 > > "selected=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'} > name=3D'ENABLE_REMOTELOG' $checked{'ENABLE_REMOTELOG'}{'on'} /> > > $Lang::tr{'log server address'} > name=3D'REMOTELOG_ADDR' value=3D'$logsettings{'REMOTELOG_ADDR'}' /> > > + $Lang::tr{'log server protocol'} > > + > > > > > > END =20 --===============2009510254451631226==--