Re: [ nagiosplug-Bugs-3614716 ] np_net_ssl_read fails to take SSL_WANT_READ into account

William Leibzon <[email protected]>
Newsgroups gmane.network.nagios.plugins.devel
Message-ID <CAFCy1Bji9B_JHn0BLm7B5bhtK9D8r6KGijbAY8KxceU0W9MQwQ@mail.gmail.com>
Holger,

I'll take this and send you a github pull request.

Personally I think if it gives an error once, its not a big deal
because nagios should send notifications after two or more consecutive
errors. But I agree that this is valid point and SSL_WANT_READ needs
to be handled.

For my fix I'll add short delay between retries and max # of retries.

On Tue, Jul 16, 2013 at 1:24 PM, SourceForge.net
<[email protected]> wrote:
> Bugs item #3614716, was opened at 2013-07-16 07:17
> Message generated for change (Settings changed) made by hweiss
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3614716&group_id=29880
>
> Please note that this message will contain a full copy of the comment thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: General plugin execution
> Group: Release (specify)
> Status: Open
> Resolution: None
> Priority: 5
> Private: No
> Submitted By: Pepijn Schmitz (pepijn)
>>Assigned to: Holger Weiss (hweiss)
> Summary: np_net_ssl_read fails to take SSL_WANT_READ into account
>
> Initial Comment:
> The np_net_ssl_read function in sslutils.c fails to take the SSL_ERROR_WANT_READ return code into account. This is not an error but indicates that the read should be retried. It can occur for instance when an SSL/TLS renegotiation occurs. This is causing the following check_http command to fail with a "HTTP CRITICAL - Error on receive" message, causing a false negative (the site in question works fine):
>
> check_http -I www.essentialmall.com -S
>
> The fix is to replace the np_net_ssl_read() function with this:
>
> int np_net_ssl_read(void *buf, int num) {
>         int rc;
>         do {
>                 rc = SSL_read(s, buf, num);
>         } while ((rc < 0) && (SSL_get_error(s, rc) == SSL_ERROR_WANT_READ));
>         return rc;
> }
>
> ----------------------------------------------------------------------
>
> Comment By: Jan Wagner (cyco_dd)
> Date: 2013-07-16 09:40
>
> Message:
> easiest way to get patches integrated is to send push requests to
> https://github.com/nagios-plugins/nagios-plugins
>
> ----------------------------------------------------------------------
>
> Comment By: Pepijn Schmitz (pepijn)
> Date: 2013-07-16 07:19
>
> Message:
> This is in release 1.4.16.
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3614716&group_id=29880
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________________
> Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________________
Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.