From: Amos Jeffries Date: Tue, 22 Jan 2013 04:40:39 +0000 (-0700) Subject: Polish debug messages on Path MTU discovery on client connections X-Git-Tag: SQUID_3_3_1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdfbd5e4d0972fd3783145df7051a8a0bd993015;p=thirdparty%2Fsquid.git Polish debug messages on Path MTU discovery on client connections * Display errors when PMTUd disable operation fails * Correct debug message about PMTUd support being absent Detected by Coverity Scan. Issue 740319 --- diff --git a/src/client_side.cc b/src/client_side.cc index 3555e9322e..9f069873df 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -3287,13 +3287,14 @@ connStateCreate(const Comm::ConnectionPointer &client, AnyP::PortCfg *port) (result->transparent() || port->disable_pmtu_discovery == DISABLE_PMTU_ALWAYS)) { #if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT) int i = IP_PMTUDISC_DONT; - setsockopt(client->fd, SOL_IP, IP_MTU_DISCOVER, &i, sizeof i); + if (setsockopt(client->fd, SOL_IP, IP_MTU_DISCOVER, &i, sizeof(i)) < 0) + debugs(33, 2, "WARNING: Path MTU discovery disabling failed on " << client << " : " << xstrerror()); #else - static int reported = 0; + static bool reported = false; if (!reported) { - debugs(33, DBG_IMPORTANT, "Notice: httpd_accel_no_pmtu_disc not supported on your platform"); - reported = 1; + debugs(33, DBG_IMPORTANT, "NOTICE: Path MTU discovery disabling is not supported on your platform."); + reported = true; } #endif }