Re: udp_outgoing_peer (was: Re: squid.conf (udp_incoming/outgoing_address))

From: Jan Wedekind <>
Date: Mon, 05 Apr 1999 04:05:53 +0200


> Jan Wedekind wrote:
> > To express in other words: a neighbor/peer request from Location A will
> > always have the source address So the response from
> > Location B will go to this address, which itself is configured there.
> > So the response will never go to Location A :-(
> I don't understand your problem, or what you are trying to say above.
> udp_incoming_address is where Squid listens for queries from other
> peers. Replies to received queries are also sent using this address.
> udp_outgoing_address is what Squid uses when sending queries to other
> peers. Replies to those queries are also accepted on this address.
> >From your description it sounds like you only have reinvented
> udp_incoming_address. Or have I completely misunderstood what you are
> trying to do?
Mmh, let my try to explain our problem in other words or where it comes

By running the proxy with the default (e.g. none) udp_outgoing_address,
we got the following problem: (using squid 2.1.patch2) said:
> - squid's response after a few request:
> 'Detected DEAD Parent:' und
> 'WARNING: Ignored 10 replies from non-peer' oder
> 'WARNING: Ignored 10 replies from non-peer'

This is, because the official addresses of the proxy servers are
virtual interfaces / addresses on the server machines, but the
ICP-reply will get the hard interface address from the variable
theOutICPAddr in icpCreateMessage(), icp_v2.c line 109.
The reason for this behaviour may be version (at least 2.1.p2)
dependend, but after a brief look into the statistics I don't think
this. (It's also logical to identify the response after the IP-address
of the servers socket.)

So we switched to use 'udp_outgoing_address' at both servers with
happy customers. But the proxy no longer were able to use each other
as siblings for the following reason:

*Both* IP-addresses of are configured as virtual
interfaces at both machines at any time for *backup* reasons, so
that the servers can't use these addresses to ask each other:

An ICP request from location A ( will leave
the server with an address ( which is also configured
at location B (
Therefore any ICP response from there will be send to the local
configured interface to be dropped by squid itself as an unexpected

One solution to this problem is the provided patch, which will cause
to send (and receive) ICP Peer queries over a special
(here: hard) interface with a certain IP-address.


PS: As I reviewed the source I found a bug in my stuff,
    and I might append a diff to the diff from yesterday.

diff squid-2.2.peer-0.7.diff squid-2.2.peer-0.8.diff 
< --- squid-2.2.peer/src/icp_v2.c       Sun Apr  4 11:30:12 1999
> --- squid-2.2.peer/src/icp_v2.c       Mon Apr  5 03:12:12 1999
< --- 551,558 ----
> --- 551,560 ----
< +     assert(thePeerIcpConnection > -1);
< +     commSetSelect(thePeerIcpConnection, COMM_SELECT_READ, NULL, NULL, 0);
> +     if (thePeerIcpConnection != theOutIcpConnection) {
> +       assert(thePeerIcpConnection > -1);
> +       commSetSelect(thePeerIcpConnection, COMM_SELECT_READ, NULL, NULL, 0);
> +     }
< --- 562,573 ----
> --- 564,575 ----
Received on Sun Apr 04 1999 - 19:51:14 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:45:42 MST