Re: Very odd problem running squid 2.7 on Windows

From: Adrian Chadd <adrian_at_squid-cache.org>
Date: Sun, 24 May 2009 10:38:37 +0800

Can you craft a small C program to replicate the behaviour?

adrian

2009/5/24 Guido Serassio <guido.serassio_at_acmeconsulting.it>:
> Hi,
>
> One user has reported a very strange problem using cache_peer directive on
> 2.7 STABLE6 running on Windows:
>
> When using the following config:
>
> cache_peer 192.168.0.63 parent 3329 0 no-query
> cache_peer rea.acmeconsulting.loc parent 3328 3130
>
> the result is always:
>
> 2009/05/23 12:35:28| Configuring 192.168.0.63 Parent 192.168.0.63/3329/0
> 2009/05/23 12:35:28| Configuring rea.acmeconsulting.loc Parent
> rea.acmeconsulting.loc/13/3130
>
> Very odd ....
>
> Debugging the code, I have found where is situated the problem.
>
> The following if GetService() from cache_cf.c:
>
> static u_short
> GetService(const char *proto)
> {
> struct servent *port = NULL;
> char *token = strtok(NULL, w_space);
> if (token == NULL) {
> self_destruct();
> return -1; /* NEVER REACHED */
> }
> port = getservbyname(token, proto);
> if (port != NULL) {
> return ntohs((u_short) port->s_port);
> }
> return xatos(token);
> }
>
> When the value of port->s_port is 3328, ntohs() always returns 13.
> Other values seems to work fine.
>
> Any idea ?
>
> Regards
>
> Guido
>
>
>
> -
> ========================================================
> Guido Serassio
> Acme Consulting S.r.l. - Microsoft Certified Partner
> Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
> Tel. : +39.011.9530135 Fax. : +39.011.9781115
> Email: guido.serassio_at_acmeconsulting.it
> WWW: http://www.acmeconsulting.it/
>
>
Received on Sun May 24 2009 - 02:38:41 MDT

This archive was generated by hypermail 2.2.0 : Sun May 24 2009 - 12:00:02 MDT