From: wessels <> Date: Fri, 20 Apr 2007 03:25:38 +0000 (+0000) Subject: Fix Squid <-> pinger communication. X-Git-Tag: SQUID_3_0_PRE6~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1535fc3978b21e010e1a3dee7a470200cf41a89;p=thirdparty%2Fsquid.git Fix Squid <-> pinger communication. Somebody thought it would be nice to use a socketpair(), rather than a UDP socket, for squid-pinger IPC. But socketpair() messages cannot be larger than 4096 bytes. Pinger is sending ~8KB messages back to Squid, so we must use UDP (or something that supports large messages). --- diff --git a/src/icmp.cc b/src/icmp.cc index 9071042fa4..859c17c3ea 100644 --- a/src/icmp.cc +++ b/src/icmp.cc @@ -1,6 +1,6 @@ /* - * $Id: icmp.cc,v 1.89 2006/09/11 09:36:06 serassio Exp $ + * $Id: icmp.cc,v 1.90 2007/04/19 21:25:38 wessels Exp $ * * DEBUG: section 37 ICMP Routines * AUTHOR: Duane Wessels @@ -238,7 +238,12 @@ icmpOpen(void) int wfd; args[0] = "(pinger)"; args[1] = NULL; - pid = ipcCreate(IPC_DGRAM, + /* + * Do NOT use IPC_DGRAM (=IPC_UNIX_DGRAM) here because you can't + * send() more than 4096 bytes on a socketpair() socket (at + * least on FreeBSD). + */ + pid = ipcCreate(IPC_UDP_SOCKET, Config.Program.pinger, args, "Pinger Socket",