]> The Tcpdump Group git mirrors - libpcap/commitdiff
When using SOCK_PACKET sockets, which don't support cooked mode, reject
authorguy <guy>
Thu, 25 Oct 2001 18:09:59 +0000 (18:09 +0000)
committerguy <guy>
Thu, 25 Oct 2001 18:09:59 +0000 (18:09 +0000)
any link-layer types that would get mapped to cooked mode.

pcap-linux.c

index 89446291261fd63565dca3d797b6f71e238fcbb6..49058ab6ec890733fd1a4a84f072fbdc509d1a1d 100644 (file)
@@ -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;