From: Amos Jeffries Date: Fri, 19 Nov 2010 12:04:58 +0000 (+1300) Subject: Fix cachemgr http_port config report hiding options X-Git-Tag: take1~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df1b20e405c3c5bd0e8de9b58a683f599d6a62da;p=thirdparty%2Fsquid.git Fix cachemgr http_port config report hiding options --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 71fde205ef..4f51f752dc 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -3752,23 +3752,47 @@ dump_generic_http_port(StoreEntry * e, const char *n, const http_port_list * s) n, s->s.ToURL(buf,MAX_IPSTRLEN)); + // MODES and specific sub-options. if (s->intercepted) storeAppendPrintf(e, " intercept"); - if (s->spoof_client_ip) + else if (s->spoof_client_ip) storeAppendPrintf(e, " tproxy"); - if (s->accel) + else if (s->accel) { storeAppendPrintf(e, " accel"); - if (s->vhost) - storeAppendPrintf(e, " vhost"); + if (s->vhost) + storeAppendPrintf(e, " vhost"); - if (s->vport) - storeAppendPrintf(e, " vport"); + if (s->vport < 0) + storeAppendPrintf(e, " vport"); + else if (s->vport > 0) + storeAppendPrintf(e, " vport=%d", s->vport); - if (s->defaultsite) - storeAppendPrintf(e, " defaultsite=%s", s->defaultsite); + if (s->defaultsite) + storeAppendPrintf(e, " defaultsite=%s", s->defaultsite); + + if (s->protocol && strcmp(s->protocol,"http") != 0) + storeAppendPrintf(e, " protocol=%s", s->protocol); + + if (s->allow_direct) + storeAppendPrintf(e, " allow-direct"); + + if (s->ignore_cc) + storeAppendPrintf(e, " ignore-cc"); + + } + + // Generic independent options + + if (s->name) + storeAppendPrintf(e, " name=%s", s->name); + +#if !USE_HTTP_VIOLATIONS + if (!s->accel && s->ignore_cc) + storeAppendPrintf(e, " ignore-cc"); +#endif if (s->connection_auth_disabled) storeAppendPrintf(e, " connection-auth=off"); @@ -3786,6 +3810,9 @@ dump_generic_http_port(StoreEntry * e, const char *n, const http_port_list * s) storeAppendPrintf(e, " disable-pmtu-discovery=%s", pmtu); } + if (s->s.IsAnyAddr() && !s->s.IsIPv6()) + storeAppendPrintf(e, " ipv4"); + if (s->tcp_keepalive.enabled) { if (s->tcp_keepalive.idle || s->tcp_keepalive.interval || s->tcp_keepalive.timeout) { storeAppendPrintf(e, " tcpkeepalive=%d,%d,%d", s->tcp_keepalive.idle, s->tcp_keepalive.interval, s->tcp_keepalive.timeout); @@ -3796,7 +3823,7 @@ dump_generic_http_port(StoreEntry * e, const char *n, const http_port_list * s) #if USE_SSL if (s->sslBump) - storeAppendPrintf(e, " sslBump"); + storeAppendPrintf(e, " ssl-bump"); if (s->cert) storeAppendPrintf(e, " cert=%s", s->cert);