Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 299669 - cupsd resolves localhost to both IPv4 and IPv6 address even if only 1 is given
Summary: cupsd resolves localhost to both IPv4 and IPv6 address even if only 1 is given
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-04 20:03 UTC by Ecki B.
Modified: 2010-01-07 00:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ecki B. 2010-01-04 20:03:10 UTC
I only have an IPv4 entry for localhost (Only IPv4 is in use, but IPv6 is activated for possible diagnosis) in /etc/hosts and the only (network related) "Listen" entry "Listen localhost:631" in cupsd.conf.

When starting cupsd (tested for both versions: 1.3.11-r1 and 1.4.2-r1), I have two listening network sockets: 127.0.0.1:631 and ::1:631.

In cups source, file http-addrlist.c, I find the following comment in the source of httpAddrGetList():

     /*
      * Unfortunately, some users ignore all of the warnings in the
      * /etc/hosts file and delete "localhost" from it. If we get here
      * then we were unable to resolve the name, so use the IPv6 and/or
      * IPv4 loopback interface addresses...
      */

This behaviour is incorrect (yet not completely analyzed).

If one has an entry for localhost in cupsd.conf, either localhost has to be resolved correctly or an error should be thrown if localhost can't be resolved.
Comment 1 Timo Gurr (RETIRED) gentoo-dev 2010-01-05 09:32:12 UTC
Please take such things upstream by filing a bug in the CUPS bugtracker if you're absolutly sure it's no configuration issue. We generally won't change how a programm works. If your bug gets fixed upstream and a patch is available feel free to reopen this bug, adding the URL to the upstream bug in the URL field and I'll gladly apply the patch to our ebuild.
Comment 2 Ecki B. 2010-01-06 16:42:29 UTC
Upstream handling is not intended by the CUPS folks (please have a look at http://www.cups.org/str.php?L3464 for the discussion).

This means, that CUPS will keep this incorrect behaviour, and, taking the generality of your former message for serious, that CUPS on Gentoo will behave the same. That in turn means, that every user will have to maintain a portage overlay only for getting a correct application behaviour. Is that really what is intended?
Comment 3 Timo Gurr (RETIRED) gentoo-dev 2010-01-07 00:48:12 UTC
(In reply to comment #2)
> Upstream handling is not intended by the CUPS folks (please have a look at
> http://www.cups.org/str.php?L3464 for the discussion).
> 
> This means, that CUPS will keep this incorrect behaviour, and, taking the
> generality of your former message for serious, that CUPS on Gentoo will behave
> the same. That in turn means, that every user will have to maintain a portage
> overlay only for getting a correct application behaviour. Is that really what
> is intended?

Actually yes. Our Gentoo policy is to not change upstream behaviour of applications. If for some reason (like bugfixes) we do, we usually make sure to get that part upstream so everyone can benefit from the improvement. In this case upstream clearly states that this is intended behaviour and won't get addressed so you either have to live with it, convince upstream to change it, use a local overlay or some other distribution which ship and maintain their own patchsets for applications.
I also fail to see the need for a local overlay when you can simply work around your problem by changing the Listen entry in cupsd.conf

Apart from that most probably unsatisfying answer I've to thank you very much for taking the time and motivation to file and discuss your problem with upstream.