diff -uNr libpcap-0.8.1-pfring/pcap-linux.c libpcap-0.8.1-pfring-version/pcap-linux.c --- libpcap-0.8.1-pfring/pcap-linux.c 2004-04-26 17:51:34.000000000 +0200 +++ libpcap-0.8.1-pfring-version/pcap-linux.c 2004-04-27 12:25:42.000000000 +0200 @@ -309,6 +309,12 @@ } handle->slots_info = (FlowSlotInfo *)handle->ring_buffer; + if(handle->slots_info->version != RING_FLOWSLOT_VERSION) { + snprintf(ebuf, PCAP_ERRBUF_SIZE, "Wrong RING version: " + "kernel is %i, libpcap was compiled with %i\n", + handle->slots_info->version, RING_FLOWSLOT_VERSION); + return (NULL); + } memSlotsLen = handle->slots_info->tot_num_pages*PAGE_SIZE; munmap(handle->ring_buffer, PAGE_SIZE);