~ubuntu-branches/ubuntu/maverick/squid3/maverick-updates

« back to all changes in this revision

Viewing changes to src/ip/IpIntercept.cc

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-08-10 17:28:42 UTC
  • mfrom: (21.2.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100810172842-iji5h90owqorkix1
Tags: 3.1.6-1ubuntu1
* Merge with Debian unstable, remaining changes:
  - Provide ufw profile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
447
447
    debugs(3, 3, "Detect TPROXY support on port " << test);
448
448
#if LINUX_TPROXY2
449
449
 
450
 
#if USE_IPV6
451
 
    /* TPROXYv2 is not IPv6 capable. Force wildcard sockets to IPv4. Die on IPv6 IPs */
452
 
    debugs(3, DBG_IMPORTANT, "Disabling IPv6 on port " << test << " (TPROXYv2 interception enabled)");
453
 
    if ( test.IsIPv6() && !test.SetIPv4() ) {
454
 
        debugs(3, DBG_CRITICAL, "IPv6 requires TPROXYv4 support. You only have TPROXYv2 for " << test );
455
 
        return false;
 
450
    if (Ip::EnableIpv6) {
 
451
        /* TPROXYv2 is not IPv6 capable. Force wildcard sockets to IPv4. Die on IPv6 IPs */
 
452
        debugs(3, DBG_IMPORTANT, "Disabling IPv6 on port " << test << " (TPROXYv2 interception enabled)");
 
453
        if ( test.IsIPv6() && !test.SetIPv4() ) {
 
454
            debugs(3, DBG_CRITICAL, "IPv6 requires TPROXYv4 support. You only have TPROXYv2 for " << test );
 
455
            return false;
 
456
        }
456
457
    }
457
 
#endif /* USE_IPV6 */
458
458
    return true;
459
459
 
460
460
#else /* not LINUX_TPROXY2 */
464
464
    int tos = 1;
465
465
    int tmp_sock = -1;
466
466
 
467
 
#if USE_IPV6
468
467
    /* Probe to see if the Kernel TPROXY support is IPv6-enabled */
469
468
    if (test.IsIPv6()) {
470
469
        debugs(3, 3, "...Probing for IPv6 TPROXY support.");
492
491
        debugs(3, DBG_CRITICAL, "TPROXY lacks IPv6 support for " << test );
493
492
        return false;
494
493
    }
495
 
#endif
496
494
 
497
495
    /* Probe to see if the Kernel TPROXY support is IPv4-enabled (aka present) */
498
496
    if (test.IsIPv4()) {