~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to src/ip/tools.cc

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2011-01-21 18:43:56 UTC
  • mfrom: (1.4.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20110121184356-4zn7gwuzws6lpnuc
Tags: 3.1.10-1
* New upstream release (Closes: #609881)
  - Removed patches integrated upstream
    + 16-CVE-2010-3072
    + 17-CVE-2010-2951
  - Fixes TCP DNS lookups failure on IPv6-disabled systems (Closes: #607379)
  - Fixes HTTPS not working if IPv6 is disabled (Closes: #594713)

* debian/rules
  - Enable ZPH feature (Closes: #597687)

* debian/squid3.ufw.profile
  - Added UFW profile, thanks to Alessio Treglia (Closes: #605088)

* debian/control
  - Added versioned dependency on squid-langpack

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "Debug.h"
35
35
#include "ip/tools.h"
36
36
 
 
37
#if HAVE_UNISTD_H
 
38
#include <unistd.h>
 
39
#endif
37
40
#if HAVE_SYS_SOCKET_H
38
41
#include <sys/socket.h>
39
42
#endif
59
62
    }
60
63
 
61
64
    // Test for v4-mapping capability
 
65
    // (AKA. the operating system supports RFC 3493 section 5.3)
 
66
#if defined(IPV6_V6ONLY)
62
67
    int tos = 0;
63
68
    if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &tos, sizeof(int)) == 0) {
64
69
        debugs(3, 2, "Detected IPv6 hybrid or v4-mapping stack...");
67
72
        debugs(3, 2, "Detected split IPv4 and IPv6 stacks ...");
68
73
        EnableIpv6 |= IPV6_SPECIAL_SPLITSTACK;
69
74
    }
 
75
#else
 
76
    // compliance here means they at least supply the option for compilers building code
 
77
    // even if possibly to return hard-coded -1 on use.
 
78
    debugs(3, 2, "Missing RFC 3493 compliance - attempting split IPv4 and IPv6 stacks ...");
 
79
    EnableIpv6 |= IPV6_SPECIAL_SPLITSTACK;
 
80
#endif
70
81
    close(s);
71
82
 
72
83
    debugs(3, 2, "IPv6 transport " << (EnableIpv6?"Enabled":"Disabled"));