diff options
author | risso <risso> | 2002-08-07 13:21:39 +0000 |
---|---|---|
committer | risso <risso> | 2002-08-07 13:21:39 +0000 |
commit | 2a4f3047d61d1bd7d078a219f8132af0d1f3b736 (patch) | |
tree | 88e7fefc9a49dc43e2ef7762e4096e86cc5dc2af /fad-win32.c | |
parent | a08f7e4faa001e04be85aa763ce355851a3185f0 (diff) |
pcap_add_if_win32 added a fake ip address (0.0.0.0) to interfaces without addresses. Now it doesn't add anything to the address list.
Diffstat (limited to 'fad-win32.c')
-rw-r--r-- | fad-win32.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/fad-win32.c b/fad-win32.c index 0ee7b8d..6959fb2 100644 --- a/fad-win32.c +++ b/fad-win32.c @@ -19,11 +19,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/fad-win32.c,v 1.2 2002-08-05 07:45:09 guy Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -167,23 +162,10 @@ pcap_add_if_win32(pcap_if_t **devlist, char *name, const char *desc, */ if (!PacketGetNetInfoEx((void *)name, if_addrs, &if_addr_size)) { /* - * Failure. + * Failure. Return A succesful code, but don't add any address to the list */ - addr=(struct sockaddr_in*)malloc(sizeof(struct sockaddr_in)); - netmask=(struct sockaddr_in*)malloc(sizeof(struct sockaddr_in)); - - addr->sin_family = AF_INET; - addr->sin_addr.s_addr = 0; - netmask->sin_family = AF_INET; - netmask->sin_addr.s_addr = 0; - - return (add_addr_to_list(curdev, - (struct sockaddr*)addr, - (struct sockaddr*)netmask, - NULL, - NULL, - errbuf)); + return 0; } /* |