From 2a4f3047d61d1bd7d078a219f8132af0d1f3b736 Mon Sep 17 00:00:00 2001 From: risso Date: Wed, 7 Aug 2002 13:21:39 +0000 Subject: 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. --- fad-win32.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'fad-win32.c') 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; } /* -- cgit v1.2.3