Bug 743585 - 127.0.0.1 not seen as loopback address
Summary: 127.0.0.1 not seen as loopback address
Keywords:
Status: CLOSED DUPLICATE of bug 737230
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-05 13:04 UTC by Tim Waugh
Modified: 2011-10-05 17:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-05 17:42:27 UTC


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.