Index: src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid/squid/src/cf.data.pre,v
retrieving revision 1.116
diff -u -r1.116 cf.data.pre
--- src/cf.data.pre	29 May 2006 16:51:12 -0000	1.116
+++ src/cf.data.pre	30 May 2006 03:48:42 -0000
@@ -4084,22 +4084,21 @@
 
 	The format is:
 
-	wccp2_service_info <id> proto=<protocol> flags=<flag>,<flag>..
+	wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
 	    priority=<priority> ports=<port>,<port>..
 
 	The relevant WCCPv2 flags:
 	+ src_ip_hash, dst_ip_hash
 	+ source_port_hash, dest_port_hash
-	+ ports_defined, ports_source
 	+ src_ip_alt_hash, dst_ip_alt_hash
 	+ src_port_alt_hash, dst_port_alt_hash
+	+ ports_source
 
-	The port list can be one to eight entries. Specifying no ports is
-	currently valid but may result in a confused router.
+	The port list can be one to eight entries.
 
 	Example:
 
-	wccp2_service_info 80 proto=tcp flags=src_ip_hash,ports_source
+	wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
 	    priority=240 ports=80
 
 	Note: the service id must have been defined by a previous
Index: src/wccp2.c
===================================================================
RCS file: /cvsroot/squid/squid/src/wccp2.c,v
retrieving revision 1.9
diff -u -r1.9 wccp2.c
--- src/wccp2.c	27 May 2006 11:50:50 -0000	1.9
+++ src/wccp2.c	30 May 2006 03:48:49 -0000
@@ -1349,8 +1349,6 @@
 	    retflag |= WCCP2_SERVICE_SOURCE_PORT_HASH;
 	} else if (strcmp(flag, "dst_port_hash") == 0) {
 	    retflag |= WCCP2_SERVICE_DST_PORT_HASH;
-	} else if (strcmp(flag, "ports_defined") == 0) {
-	    retflag |= WCCP2_SERVICE_PORTS_DEFINED;
 	} else if (strcmp(flag, "ports_source") == 0) {
 	    retflag |= WCCP2_SERVICE_PORTS_SOURCE;
 	} else if (strcmp(flag, "src_ip_alt_hash") == 0) {
@@ -1435,6 +1433,7 @@
 	    flags = parse_wccp2_service_flags(t + 6);
 	} else if (strncmp(t, "ports=", 6) == 0) {
 	    parse_wccp2_service_ports(t + 6, portlist);
+	    flags |= WCCP2_SERVICE_PORTS_DEFINED;
 	} else if (strncmp(t, "protocol=tcp", 12) == 0) {
 	    protocol = IPPROTO_TCP;
 	} else if (strncmp(t, "protocol=udp", 12) == 0) {
@@ -1458,6 +1457,9 @@
     if (protocol == -1) {
 	fatalf("parse_wccp2_service_info: service %d: no protocol defined (valid: tcp or udp)!\n", service_id);
     }
+    if (!(flags & WCCP2_SERVICE_PORTS_DEFINED)) {
+	fatalf("parse_wccp2_service_info: service %d: no ports defined!\n", service_id);
+    }
     /* rightio! now we can update */
     wccp2_update_service(srv, WCCP2_SERVICE_DYNAMIC, service_id, priority,
 	protocol, flags, portlist);
