Skip to content

Commit

Permalink
pcap_add_if_win32 added a fake ip address (0.0.0.0) to interfaces wit…
Browse files Browse the repository at this point in the history
…hout addresses. Now it doesn't add anything to the address list.
  • Loading branch information
risso committed Aug 7, 2002
1 parent a08f7e4 commit 2a4f304
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions fad-win32.c
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 2a4f304

Please sign in to comment.