Index: access_log.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/access_log.cc,v retrieving revision 1.4 diff -u -p -r1.4 access_log.cc --- access_log.cc 6 Dec 2002 23:58:51 -0000 1.4 +++ access_log.cc 5 Feb 2003 08:47:52 -0000 @@ -406,7 +406,7 @@ accessLogInit(void) mcast_miss_to.sin_port = htons(Config.mcast_miss.port); mcast_miss_to.sin_addr.s_addr = Config.mcast_miss.addr.s_addr; mcast_miss_fd = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, Config.Addrs.udp_incoming, Config.mcast_miss.port, COMM_NONBLOCKING, Index: client_side.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/client_side.cc,v retrieving revision 1.18 diff -u -p -r1.18 client_side.cc --- client_side.cc 29 Jan 2003 03:13:28 -0000 1.18 +++ client_side.cc 5 Feb 2003 08:47:53 -0000 @@ -2388,7 +2388,7 @@ clientHttpConnectionsOpen(void) } enter_suid(); fd = comm_open(SOCK_STREAM, - 0, + IPPROTO_TCP, s->s.sin_addr, ntohs(s->s.sin_port), COMM_NONBLOCKING, "HTTP Socket"); leave_suid(); @@ -2422,7 +2422,7 @@ clientHttpsConnectionsOpen(void) } enter_suid(); fd = comm_open(SOCK_STREAM, - 0, + IPPROTO_TCP, s->s.sin_addr, ntohs(s->s.sin_port), COMM_NONBLOCKING, "HTTPS Socket"); leave_suid(); Index: dns_internal.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/dns_internal.cc,v retrieving revision 1.5 diff -u -p -r1.5 dns_internal.cc --- dns_internal.cc 18 Jan 2003 03:14:47 -0000 1.5 +++ dns_internal.cc 5 Feb 2003 08:47:54 -0000 @@ -626,7 +626,7 @@ idnsInit(void) else addr = Config.Addrs.udp_incoming; DnsSocket = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, addr, 0, COMM_NONBLOCKING, Index: forward.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/forward.cc,v retrieving revision 1.9 diff -u -p -r1.9 forward.cc --- forward.cc 28 Jan 2003 03:13:08 -0000 1.9 +++ forward.cc 5 Feb 2003 08:47:54 -0000 @@ -457,7 +457,7 @@ fwdConnectStart(void *data) debug(17, 3) ("fwdConnectStart: got addr %s, tos %d\n", inet_ntoa(outgoing), tos); fd = comm_openex(SOCK_STREAM, - 0, + IPPROTO_TCP, outgoing, 0, COMM_NONBLOCKING, Index: ftp.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/ftp.cc,v retrieving revision 1.8 diff -u -p -r1.8 ftp.cc --- ftp.cc 2 Feb 2003 03:12:31 -0000 1.8 +++ ftp.cc 5 Feb 2003 08:47:56 -0000 @@ -1695,7 +1695,7 @@ ftpSendPasv(FtpStateData * ftpState) } /* Open data channel with the same local address as control channel */ fd = comm_open(SOCK_STREAM, - 0, + IPPROTO_TCP, addr.sin_addr, 0, COMM_NONBLOCKING, @@ -1843,7 +1843,7 @@ ftpOpenListenSocket(FtpStateData * ftpSt port = ntohs(addr.sin_port); } fd = comm_open(SOCK_STREAM, - 0, + IPPROTO_TCP, addr.sin_addr, port, COMM_NONBLOCKING | (fallback ? COMM_REUSEADDR : 0), Index: htcp.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/htcp.cc,v retrieving revision 1.8 diff -u -p -r1.8 htcp.cc --- htcp.cc 23 Jan 2003 03:14:42 -0000 1.8 +++ htcp.cc 5 Feb 2003 08:47:56 -0000 @@ -919,7 +919,7 @@ htcpInit(void) } enter_suid(); htcpInSocket = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, Config.Addrs.udp_incoming, Config.Port.htcp, COMM_NONBLOCKING, @@ -933,7 +933,7 @@ htcpInit(void) if (Config.Addrs.udp_outgoing.s_addr != no_addr.s_addr) { enter_suid(); htcpOutSocket = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, Config.Addrs.udp_outgoing, Config.Port.htcp, COMM_NONBLOCKING, Index: icp_v2.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/icp_v2.cc,v retrieving revision 1.8 diff -u -p -r1.8 icp_v2.cc --- icp_v2.cc 28 Jan 2003 03:13:09 -0000 1.8 +++ icp_v2.cc 5 Feb 2003 08:47:57 -0000 @@ -554,7 +554,7 @@ icpConnectionsOpen(void) return; enter_suid(); theInIcpConnection = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, Config.Addrs.udp_incoming, port, COMM_NONBLOCKING, @@ -575,7 +575,7 @@ icpConnectionsOpen(void) if ((addr = Config.Addrs.udp_outgoing).s_addr != no_addr.s_addr) { enter_suid(); theOutIcpConnection = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, addr, port, COMM_NONBLOCKING, Index: ident.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/ident.cc,v retrieving revision 1.6 diff -u -p -r1.6 ident.cc --- ident.cc 18 Nov 2002 03:12:57 -0000 1.6 +++ ident.cc 5 Feb 2003 08:47:57 -0000 @@ -202,7 +202,7 @@ identStart(struct sockaddr_in *me, struc return; } fd = comm_open(SOCK_STREAM, - 0, + IPPROTO_TCP, me->sin_addr, 0, COMM_NONBLOCKING, Index: neighbors.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/neighbors.cc,v retrieving revision 1.7 diff -u -p -r1.7 neighbors.cc --- neighbors.cc 28 Jan 2003 03:13:09 -0000 1.7 +++ neighbors.cc 5 Feb 2003 08:47:57 -0000 @@ -1121,7 +1121,7 @@ peerProbeConnect(peer * p) return; /* probe already running */ if (squid_curtime - p->stats.last_connect_probe < Config.Timeout.connect) return; /* don't probe to often */ - fd = comm_open(SOCK_STREAM, 0, getOutgoingAddr(NULL), + fd = comm_open(SOCK_STREAM, IPPROTO_TCP, getOutgoingAddr(NULL), 0, COMM_NONBLOCKING, p->host); if (fd < 0) return; Index: snmp_core.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/snmp_core.cc,v retrieving revision 1.6 diff -u -p -r1.6 snmp_core.cc --- snmp_core.cc 28 Jan 2003 03:13:09 -0000 1.6 +++ snmp_core.cc 5 Feb 2003 08:47:58 -0000 @@ -357,7 +357,7 @@ snmpConnectionOpen(void) if ((port = Config.Port.snmp) > (u_short) 0) { enter_suid(); theInSnmpConnection = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, Config.Addrs.snmp_incoming, port, COMM_NONBLOCKING, @@ -371,7 +371,7 @@ snmpConnectionOpen(void) if (Config.Addrs.snmp_outgoing.s_addr != no_addr.s_addr) { enter_suid(); theOutSnmpConnection = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, Config.Addrs.snmp_outgoing, port, COMM_NONBLOCKING, Index: squid.h =================================================================== RCS file: /cvsroot/squid/squid3/src/squid.h,v retrieving revision 1.5 diff -u -p -r1.5 squid.h --- squid.h 28 Dec 2002 03:12:34 -0000 1.5 +++ squid.h 5 Feb 2003 08:47:58 -0000 @@ -417,4 +417,12 @@ extern "C" { #define FD_READ_METHOD(fd, buf, len) (*fd_table[fd].read_method)(fd, buf, len) #define FD_WRITE_METHOD(fd, buf, len) (*fd_table[fd].write_method)(fd, buf, len) +#ifndef IPPROTO_UDP +#define IPPROTO_UDP 0 +#endif + +#ifndef IPPROTO_TCP +#define IPPROTO_TCP 0 +#endif + #endif /* SQUID_H */ Index: ssl.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/ssl.cc,v retrieving revision 1.8 diff -u -p -r1.8 ssl.cc --- ssl.cc 28 Jan 2003 03:13:09 -0000 1.8 +++ ssl.cc 5 Feb 2003 08:47:58 -0000 @@ -465,7 +465,7 @@ sslStart(clientHttpRequest * http, size_ statCounter.server.other.requests++; /* Create socket. */ sock = comm_openex(SOCK_STREAM, - 0, + IPPROTO_TCP, getOutgoingAddr(request), 0, COMM_NONBLOCKING, Index: wccp.cc =================================================================== RCS file: /cvsroot/squid/squid3/src/wccp.cc,v retrieving revision 1.5 diff -u -p -r1.5 wccp.cc --- wccp.cc 18 Nov 2002 03:12:57 -0000 1.5 +++ wccp.cc 5 Feb 2003 08:47:59 -0000 @@ -129,7 +129,7 @@ wccpConnectionOpen(void) return; } theInWccpConnection = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, Config.Wccp.incoming, port, COMM_NONBLOCKING, @@ -145,7 +145,7 @@ wccpConnectionOpen(void) (int) port, theInWccpConnection); if (Config.Wccp.outgoing.s_addr != no_addr.s_addr) { theOutWccpConnection = comm_open(SOCK_DGRAM, - 0, + IPPROTO_UDP, Config.Wccp.outgoing, port, COMM_NONBLOCKING,