aboutsummaryrefslogtreecommitdiff
path: root/inet.c
diff options
context:
space:
mode:
authorassar <assar>2000-04-09 20:59:31 +0000
committerassar <assar>2000-04-09 20:59:31 +0000
commit00031c93a7614b0255d41ce8aa30ec22fd6f8818 (patch)
tree385ee0bd36459cc59d01442ed527b1febf301ef7 /inet.c
parent48475b805d52fb526c052422e23ff19f93f3714f (diff)
(pcap_lookupdev): solaris seems to return EINVAL when the buffer is
not large enough, so interpret that as that we should try again with a larger buffer
Diffstat (limited to 'inet.c')
-rw-r--r--inet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/inet.c b/inet.c
index 961032b2..f6c5a671 100644
--- a/inet.c
+++ b/inet.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/inet.c,v 1.27 2000-02-23 11:39:45 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/inet.c,v 1.28 2000-04-09 20:59:31 assar Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -159,7 +159,8 @@ pcap_lookupdev(errbuf)
ifc.ifc_len = buf_size;
ifc.ifc_buf = buf;
memset (buf, 0, buf_size);
- if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0) {
+ if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0
+ && errno != EINVAL) {
free (buf);
(void)sprintf(errbuf, "SIOCGIFCONF: %s",
pcap_strerror(errno));