/*
- * $Id: cache_cf.cc,v 1.462 2005/01/03 16:08:25 robertc Exp $
+ * $Id: cache_cf.cc,v 1.463 2005/02/09 13:01:40 serassio Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
unsigned short port = 0;
char *t;
+ s->disable_pmtu_discovery = DISABLE_PMTU_OFF;
+
if ((t = strchr(token, ':'))) {
/* host:port */
host = token;
s->accel = 1;
} else if (strcmp(token, "accel") == 0) {
s->accel = 1;
+ } else if (strncmp(token, "disable-pmtu-discovery=", 23) == 0) {
+ if (!strcasecmp(token + 23, "off"))
+ s->disable_pmtu_discovery = DISABLE_PMTU_OFF;
+ else if (!strcasecmp(token + 23, "transparent"))
+ s->disable_pmtu_discovery = DISABLE_PMTU_TRANSPARENT;
+ else if (!strcasecmp(token + 23, "always"))
+ s->disable_pmtu_discovery = DISABLE_PMTU_ALWAYS;
+ else
+ self_destruct();
} else {
self_destruct();
}
if (s->vport)
storeAppendPrintf(e, " vport");
+
+ if (s->disable_pmtu_discovery != DISABLE_PMTU_OFF) {
+ const char *pmtu;
+
+ if (s->disable_pmtu_discovery == DISABLE_PMTU_ALWAYS)
+ pmtu = "always";
+ else
+ pmtu = "transparent";
+
+ storeAppendPrintf(e, " disable-pmtu-discovery=%s", pmtu);
+ }
}
static void
#
-# $Id: cf.data.pre,v 1.373 2005/01/29 19:41:22 serassio Exp $
+# $Id: cf.data.pre,v 1.374 2005/02/09 13:01:40 serassio Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
protocol= Protocol to reconstruct accelerated requests with.
Defaults to http
+ disable-pmtu-discovery=
+ Control Path-MTU discovery usage:
+ off lets OS decide on what to do (default).
+ transparent disable PMTU discovery when transparent
+ support is enabled.
+ always disable always PMTU discovery.
+
+ In many setups of transparently intercepting proxies Path-MTU
+ discovery can not work on traffic towards the clients. This is
+ the case when the intercepting device does not fully track
+ connections and fails to forward ICMP must fragment messages
+ to the cache server. If you have such setup and experience that
+ certain clients sporadically hang or never complete requests set
+ disable-pmtu-discovery option to 'transparent'.
+
If you run Squid on a dual-homed machine with an internal
and an external interface we recommend you to specify the
internal address:port in http_port. This way Squid will only be
/*
- * $Id: client_side.cc,v 1.679 2005/01/23 11:32:42 serassio Exp $
+ * $Id: client_side.cc,v 1.680 2005/02/09 13:01:40 serassio Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
}
}
+ if (port->disable_pmtu_discovery != DISABLE_PMTU_OFF &&
+ (result->transparent() || port->disable_pmtu_discovery == DISABLE_PMTU_ALWAYS))
+ {
+#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
+ int i = IP_PMTUDISC_DONT;
+ setsockopt(fd, SOL_IP, IP_MTU_DISCOVER, &i, sizeof i);
+
+#else
+
+ static int reported = 0;
+
+ if (!reported) {
+ debug(33, 1) ("Notice: httpd_accel_no_pmtu_disc not supported on your platform\n");
+ reported = 1;
+ }
+
+#endif
+
+ }
+
result->flags.readMoreRequests = 1;
return result;
}
/*
- * $Id: enums.h,v 1.239 2004/12/21 17:52:53 robertc Exp $
+ * $Id: enums.h,v 1.240 2005/02/09 13:01:40 serassio Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
CLF_NONE
} customlog_type;
+enum {
+ DISABLE_PMTU_OFF,
+ DISABLE_PMTU_ALWAYS,
+ DISABLE_PMTU_TRANSPARENT
+};
+
#endif /* SQUID_ENUMS_H */
/*
- * $Id: structs.h,v 1.507 2005/01/08 22:50:45 hno Exp $
+ * $Id: structs.h,v 1.508 2005/02/09 13:01:40 serassio Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
1; /* uses host header */
int vport; /* virtual port support, -1 for dynamic, >0 static*/
+ int disable_pmtu_discovery;
};