Bug 743585

Summary: 127.0.0.1 not seen as loopback address
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: alekcejk, jpopelka, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-05 17:42:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Waugh 2011-10-05 13:04:03 UTC
Description of problem:
When using http://127.0.0.1:631/ to use the CUPS web API, the address is not seen as a loopback address and so the request is denied.

Version-Release number of selected component (if applicable):
cups-1.5.0-13.fc16.x86_64

Additional info:
It comes from this check:

int                                     /* O - 1 if local host, 0 otherwise */
httpAddrLocalhost(
    const http_addr_t *addr)            /* I - Address to check */
{
  if (!addr)
    return (1);

#ifdef AF_INET6
  if (addr->addr.sa_family == AF_INET6 &&
      IN6_IS_ADDR_LOOPBACK(&(addr->ipv6.sin6_addr)))
    return (1);
#endif /* AF_INET6 */

#ifdef AF_LOCAL
  if (addr->addr.sa_family == AF_LOCAL)
    return (1);
#endif /* AF_LOCAL */

  if (addr->addr.sa_family == AF_INET &&
      (ntohl(addr->ipv4.sin_addr.s_addr) & 0xff000000) == 0x7f000000)
    return (1);

  return (0);
}

Comment 1 Tim Waugh 2011-10-05 17:42:27 UTC

*** This bug has been marked as a duplicate of bug 737230 ***