Search squid archive

Re: wccp2_service_info fails on more than one port number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It has worked in the past with WCCP2 dynamic services at multiple sites.

I’ve uncovered the wccp2_service_info ports parsing error:

--- src/wccp2.cc.ORIG	2015-03-03 11:08:18.000000000 -0600
+++ src/wccp2.cc	2015-03-03 11:10:37.000000000 -0600
@@ -2264,7 +2264,10 @@
         if (i >= WCCP2_NUMPORTS) {
             fatalf("parse_wccp2_service_ports: too many ports (maximum: 8) in list '%s'\n", options);
         }
-        int p = xatoi(tmp);
+        char copy[len + 1];
+        memcpy(copy, tmp, len);
+        copy[len] = '\0';
+        int p = xatoi(copy);
 
         if (p < 1 || p > 65535) {
             fatalf("parse_wccp2_service_ports: port value '%s' isn't valid (1..65535)\n", tmp);


> On Mar 3, 2015, at 11:06 AM, Yuri Voinov <yvoinov@xxxxxxxxx> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> You cannot combine HTTP and HTTPS in one WCCP service.
> 
> http://wiki.squid-cache.org/ConfigExamples/Intercept/CiscoIOSv15Wccp2
> 
> 
> 03.03.15 23:04, Guy Helmer пишет:
>> This used to work in 3.3.x:
>> 
>> wccp2_service_info 94 protocol=tcp flags=dst_ip_hash,ports_source
>> priority=240 ports=80,81,83,591,8008,8080,443
>> 
>> squid 3.4.12 fails: 2015/03/03 11:02:33.109| cache_cf.cc(556)
>> parseOneConfigFile: Processing: wccp2_service_info 94 protocol=tcp
>> flags=dst_ip_hash,ports_source priority=240
>> ports=80,81,83,591,8008,8080,443 2015/03/03 11:02:33.109|
>> wccp2.cc(2298) parse_wccp2_service_info: parse_wccp2_service_info:
>> called 2015/03/03 11:02:33.109| ERROR: Invalid value:
>> '80,81,83,591,8008,8080,443' is supposed to be a number.
>> 
>> Any help?
>> 
>> Thanks, Guy _______________________________________________ 
>> squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx 
>> http://lists.squid-cache.org/listinfo/squid-users
>> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> 
> iQEcBAEBAgAGBQJU9eolAAoJENNXIZxhPexGns0IAKgpDAS7pFxCArCUURUOOt5M
> sORC/zvy9VpJjuPlMsnhXuT0vOx8MxgzH/c8kDbWKZNzvvG/NUuhGrPhBzN483x1
> uuWB+sTP3dMmPIQobDGnJ1fwxwcoQVIdYyI3BSf5OtL0sE3Lj8O9eeOUbsmNey2M
> vZ8uQ+CX8XivCHzS1VUGb3z5gFYTPdYiP23lR5Ltl5d/6UHRz6HhNfwFzJWjhY95
> 14gasdVMbBjDziTc5QyJbbRvbhOwVgUAHO/FaJ8WChgmQsPmgLFP+pOM5GQ8bLaG
> ZCBs42Dvw6ZsFAuuZo5K++FVyzA3uF91Ec8wLUM+SZT7dvJTeSKeVG6ymQ4UygI=
> =OXyP
> -----END PGP SIGNATURE-----
> _______________________________________________
> squid-users mailing list
> squid-users@xxxxxxxxxxxxxxxxxxxxx
> http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux