Ignore:
Timestamp:
Jul 7, 2008 9:31:02 PM (16 years ago)
Author:
bennylp
Message:

Configuration option to include/exclude loopback interface in enum_ip_interface(), and always include loopback address in the proxy sample (thanks Filippo Zangheri for the suggestion)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ip_helper_generic.c

    r2106 r2112  
    8686        } 
    8787 
     88#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF 
    8889        if (it->ifa_flags & IFF_LOOPBACK) { 
    8990            TRACE_((THIS_FILE, "  loopback interface")); 
    9091            continue; /* Skip loopback interface */ 
    9192        } 
     93#endif 
    9294 
    9395        if (ad==NULL) { 
    9496            TRACE_((THIS_FILE, "  NULL address ignored")); 
    95             continue; /* reported to happen on Linux 2.6.25.9 */ 
     97            continue; /* reported to happen on Linux 2.6.25.9  
     98                         with ppp interface */ 
    9699        } 
    97100 
     
    189192        } 
    190193 
     194#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF 
    191195        if (itf->ifr_flags & IFF_LOOPBACK) { 
    192196            TRACE_((THIS_FILE, "  loopback interface")); 
    193197            continue; /* Skip loopback interface */ 
    194198        } 
     199#endif 
    195200 
    196201        /* Ignore 0.0.0.0/8 address. This is a special address 
     
    260265        } 
    261266 
     267#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF 
    262268        if (ifreq.ifr_flags & IFF_LOOPBACK) { 
    263269            TRACE_((THIS_FILE, "  loopback interface")); 
    264270            continue; /* Skip loopback interface */ 
    265271        } 
     272#endif 
    266273 
    267274        /* Note: SIOCGIFADDR does not work for IPv6! */ 
Note: See TracChangeset for help on using the changeset viewer.