diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-06-29 20:33:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-06-29 20:33:30 +0000 |
commit | dd383cdd3f68e11bd69a53cebcee8e260e25fe5b (patch) | |
tree | 17bafc11310991844c467238fa75d49f72d88dd3 /usr.sbin/tcpdump/tcpdump.c | |
parent | 35c1b83b83f9cd14dae66ac97983b2be91506621 (diff) |
permit attach to address-less interfaces
Diffstat (limited to 'usr.sbin/tcpdump/tcpdump.c')
-rw-r--r-- | usr.sbin/tcpdump/tcpdump.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/tcpdump.c b/usr.sbin/tcpdump/tcpdump.c index 8b5f0d0bd53..8bd3e9b425a 100644 --- a/usr.sbin/tcpdump/tcpdump.c +++ b/usr.sbin/tcpdump/tcpdump.c @@ -24,7 +24,7 @@ static const char copyright[] = "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996\n\ The Regents of the University of California. All rights reserved.\n"; static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.11 1998/09/22 22:03:02 provos Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.12 1999/06/29 20:33:29 deraadt Exp $ (LBL)"; #endif /* @@ -298,8 +298,12 @@ main(int argc, char **argv) warning("snaplen raised from %d to %d", snaplen, i); snaplen = i; } - if (pcap_lookupnet(device, &localnet, &netmask, ebuf) < 0) - error("%s", ebuf); + if (pcap_lookupnet(device, &localnet, &netmask, ebuf) < 0) { + warning("%s", ebuf); + localnet = 0; + netmask = 0; + } + /* * Let user own process after socket has been opened. */ |