From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 2/3 v3] allow changing remote syslog protocol to TCP Date: Mon, 20 Nov 2017 15:45:42 +0000 Message-ID: <1511192742.4838.539.camel@ipfire.org> In-Reply-To: <20171119174033.3dc70013.peter.mueller@link38.eu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0506670098431280616==" List-Id: --===============0506670098431280616== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Sun, 2017-11-19 at 17:40 +0100, Peter Müller wrote: > 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 > --- > 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$/) > + { > + > + } So what was going to happen here? > } > 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 < > $Lang::tr{'enabled'} name='ENABLE_REMOTELOG' $checked{'ENABLE_REMOTELOG'}{'on'} /> > $Lang::tr{'log server address'} name='REMOTELOG_ADDR' value='$logsettings{'REMOTELOG_ADDR'}' /> > + $Lang::tr{'log server protocol'} > + > > > END --===============0506670098431280616== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUFCQ2dBZEZpRUU1L3JXNWwzR0dl Mnlwa3R4Z0hudy8yK1FDUWNGQWxvUytLWUFDZ2tRZ0hudy8yK1EKQ1FlTE9SQUFtQ1BQaEd4b2tq Wisrbi9VcXFEaWlpaWdlWSt2cVBwaldIUVcrTjQ5NUZPRU1td3lLaldKUnYveQpERnpsbUpNRVBo cTB2aFQxV29RSmpESjFVTEJhbkwxdUlwTnZMMWJuaGhGd1pQU012MGZaSXh3MEkwaVIyOW9rCncr bTBFaW5YUm90dEtzVk91cWlCV0RXSFQ2Q3VZblZkc3JJeXQ0L3VrQXVEOHFoeVhYTGJlSzA1bUVD V28vRkgKcklpVlR1enNSRWVjY2xscUhzZlBwUkgyVjg2QzNMVkNXSkJ3dk90V2UrZ3lXU2tQc1lL WTZZRzR3UVdrbXJ1cQowdzhmaFhxNWkweWVuRkRQeVcxU3JsNXNGenVHVFdDYnA3UjYzbFc0RDU4 QVVUZ0Rv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