aboutsummaryrefslogtreecommitdiff
path: root/pcap-linux.c
diff options
context:
space:
mode:
authorguy <guy>2001-10-25 18:09:59 +0000
committerguy <guy>2001-10-25 18:09:59 +0000
commitc3736d4ff82fd9e56f69b56360a3081cf393edb2 (patch)
treed2f66976013874f7f3652e90f6256a8c6f7db9c5 /pcap-linux.c
parentbc61a9fd3752e56c5b7dd9ef27ae53fcb51f9bf4 (diff)
When using SOCK_PACKET sockets, which don't support cooked mode, reject
any link-layer types that would get mapped to cooked mode.
Diffstat (limited to 'pcap-linux.c')
-rw-r--r--pcap-linux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index 89446291..49058ab6 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -26,7 +26,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.70 2001-10-25 08:27:18 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.71 2001-10-25 18:09:59 guy Exp $ (LBL)";
#endif
/*
@@ -1396,7 +1396,8 @@ live_open_old(pcap_t *handle, char *device, int promisc,
* a link-layer header.
*/
map_arphrd_to_dlt(handle, arptype);
- if (handle->linktype == -1) {
+ if (handle->linktype == -1 ||
+ handle->linktype == DLT_LINUX_SLL) {
snprintf(ebuf, PCAP_ERRBUF_SIZE,
"interface type of %s not supported", device);
break;