summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/ip_helper_win32.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-06-07 11:14:32 +0000
committerBenny Prijono <bennylp@teluu.com>2008-06-07 11:14:32 +0000
commit8e2e31b4e69e0decbf0ad179012ff420322b6681 (patch)
tree51089a915b9d6148aa59a4d39132f5df3cc640ec /pjlib/src/pj/ip_helper_win32.c
parent204c24947f4f98d6d24a432d89024f8c0cdf2ca9 (diff)
Ignore 0.0.0.0/8 class IP address in interface enumeration function since this doesnt seem to have practical use for us (thanks Helmut Wolf)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1996 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/ip_helper_win32.c')
-rw-r--r--pjlib/src/pj/ip_helper_win32.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pjlib/src/pj/ip_helper_win32.c b/pjlib/src/pj/ip_helper_win32.c
index cb63adb8..76d44fa0 100644
--- a/pjlib/src/pj/ip_helper_win32.c
+++ b/pjlib/src/pj/ip_helper_win32.c
@@ -204,6 +204,12 @@ static pj_status_t enum_ipv4_interface(unsigned *p_cnt,
if (pTab->table[i].dwAddr == 0)
continue;
+ /* Ignore 0.0.0.0/8 address. This is a special address
+ * which doesn't seem to have practical use.
+ */
+ if ((pj_ntohl(pTab->table[i].dwAddr) >> 24) == 0)
+ continue;
+
#if PJ_IP_HELPER_IGNORE_LOOPBACK_IF
/* Investigate the type of this interface */
pj_bzero(&ifRow, sizeof(ifRow));