[Nagiosplug-devel] [ nagiosplug-Bugs-3614716 ] np_net_ssl_read fails to take SSL_WANT_READ into account

William Leibzon william at leibzon.org
Tue Jul 16 23:28:01 CEST 2013


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
<noreply at sourceforge.net> 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 at lists.sourceforge.net
> 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




More information about the Devel mailing list