visible_hostname defaults to hostname of first http_port IP, not get_hostname()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
squid (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
squid3 (Ubuntu) |
New
|
Medium
|
Unassigned |
Bug Description
| # TAG: visible_hostname
| # If you want to present a special hostname in error messages, etc,
| # define this. Otherwise, the return value of gethostname()
| # will be used. If you have multiple caches in a cluster and
| # get errors about IP-forwarding you must set them to have individual
| # names with this setting.
| #Default:
| # visible_hostname localhost
This isn't actually true, at least the part about gethostname().
It'll first do a reverse DNS lookup on the IP of the first http_port
entry (getMyHostname() in src/tools.cc) and only use get_hostname().
Our first http_port is 127.0.0.1 in a lot of places, so
visible_hostname is now localhost for those squids. This caused bogus
forward loop detection to kick in when our office squid tried to talk
to the squid that runs the Ubuntu Forums.
I'm not necessarily arguging that the current behaviour is wrong, but
it would be nice if the code and the docs could be consistent.
Changed in squid3 (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: precise |
no longer affects: | squid |
Sorry, this is squid3 3.1.19- 1ubuntu3. 12.04.1 on Ubuntu 12.04 LTS, FWIW.