Changeset 1996
- Timestamp:
- Jun 7, 2008 11:14:32 AM (16 years ago)
- Location:
- pjproject/trunk/pjlib/src/pj
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ip_helper_generic.c
r1668 r1996 97 97 } 98 98 99 /* Ignore 0.0.0.0/8 address. This is a special address 100 * which doesn't seem to have practical use. 101 */ 102 if (af==pj_AF_INET() && 103 (pj_ntohl(((pj_sockaddr_in*)ad)->sin_addr.s_addr) >> 24) == 0) 104 { 105 TRACE_((THIS_FILE, " address %s ignored (0.0.0.0/8 class)", 106 get_addr(ad), ad->sa_family)); 107 continue; 108 } 109 99 110 TRACE_((THIS_FILE, " address %s (af=%d) added at index %d", 100 111 get_addr(ad), ad->sa_family, *p_cnt)); … … 178 189 } 179 190 191 /* Ignore 0.0.0.0/8 address. This is a special address 192 * which doesn't seem to have practical use. 193 */ 194 if (af==pj_AF_INET() && 195 (pj_ntohl(((pj_sockaddr_in*)ad)->sin_addr.s_addr) >> 24) == 0) 196 { 197 TRACE_((THIS_FILE, " address %s ignored (0.0.0.0/8 class)", 198 get_addr(ad), ad->sa_family)); 199 continue; 200 } 201 180 202 TRACE_((THIS_FILE, " address %s (af=%d) added at index %d", 181 203 get_addr(ad), ad->sa_family, *p_cnt)); … … 215 237 *p_cnt = 0; 216 238 for (i=0; if_list[i].if_index && *p_cnt<max_count; ++i) { 239 struct sockaddr *ad; 217 240 int rc; 218 241 … … 244 267 } 245 268 246 if (ifreq.ifr_addr.sa_family != af) { 269 ad = (struct sockaddr*) &ifreq.ifr_addr; 270 271 if (ad->sa_family != af) { 247 272 TRACE_((THIS_FILE, " address %s family %d ignored", 248 273 get_addr(&ifreq.ifr_addr), … … 251 276 } 252 277 278 /* Ignore 0.0.0.0/8 address. This is a special address 279 * which doesn't seem to have practical use. 280 */ 281 if (af==pj_AF_INET() && 282 (pj_ntohl(((pj_sockaddr_in*)ad)->sin_addr.s_addr) >> 24) == 0) 283 { 284 TRACE_((THIS_FILE, " address %s ignored (0.0.0.0/8 class)", 285 get_addr(ad), ad->sa_family)); 286 continue; 287 } 288 253 289 /* Got an address ! */ 254 290 TRACE_((THIS_FILE, " address %s (af=%d) added at index %d", 255 get_addr( &ifreq.ifr_addr), ifreq.ifr_addr.sa_family, *p_cnt));291 get_addr(ad), ad->sa_family, *p_cnt)); 256 292 257 293 pj_bzero(&ifs[*p_cnt], sizeof(ifs[0])); 258 pj_memcpy(&ifs[*p_cnt], &ifreq.ifr_addr, 259 pj_sockaddr_get_len(&ifreq.ifr_addr)); 294 pj_memcpy(&ifs[*p_cnt], ad, pj_sockaddr_get_len(ad)); 260 295 (*p_cnt)++; 261 296 } -
pjproject/trunk/pjlib/src/pj/ip_helper_win32.c
r1743 r1996 205 205 continue; 206 206 207 /* Ignore 0.0.0.0/8 address. This is a special address 208 * which doesn't seem to have practical use. 209 */ 210 if ((pj_ntohl(pTab->table[i].dwAddr) >> 24) == 0) 211 continue; 212 207 213 #if PJ_IP_HELPER_IGNORE_LOOPBACK_IF 208 214 /* Investigate the type of this interface */
Note: See TracChangeset
for help on using the changeset viewer.