Blame SOURCES/0001-bpf-make-sure-sll-header-size-if-accounted-for.patch

2cd29a
From 98e98bf9cc6ee76d7861db966708b1e51cc6e014 Mon Sep 17 00:00:00 2001
2cd29a
From: rpm-build <rpm-build>
2cd29a
Date: Tue, 15 Sep 2015 13:30:37 +0200
2cd29a
Subject: [PATCH] bpf: make sure sll header size if accounted for
2cd29a
2cd29a
This got reverted when backporting bpf_filter_with_auxdata.
2cd29a
2cd29a
Related: #1176612
2cd29a
---
2cd29a
 pcap-linux.c | 6 +++---
2cd29a
 1 file changed, 3 insertions(+), 3 deletions(-)
2cd29a
2cd29a
diff --git a/pcap-linux.c b/pcap-linux.c
2cd29a
index a5b8953..f7f2aae 100644
2cd29a
--- a/pcap-linux.c
2cd29a
+++ b/pcap-linux.c
2cd29a
@@ -4306,7 +4306,7 @@ static int pcap_handle_packet_mmap(
2cd29a
                 aux_data.vlan_tag = tp_vlan_tci & 0x0fff;
2cd29a
                 aux_data.vlan_tag_present = tp_vlan_tci_valid;
2cd29a
 
2cd29a
-                if (bpf_filter_with_aux_data(handle->fcode.bf_insns, bp, tp_len, tp_snaplen, &aux_data) == 0)
2cd29a
+                if (bpf_filter_with_aux_data(handle->fcode.bf_insns, bp, tp_len, snaplen, &aux_data) == 0)
2cd29a
                         return 0;
2cd29a
         }
2cd29a
 
2cd29a
@@ -4329,7 +4329,7 @@ static int pcap_handle_packet_mmap(
2cd29a
 #if defined(HAVE_TPACKET2) || defined(HAVE_TPACKET3)
2cd29a
 	if (tp_vlan_tci_valid &&
2cd29a
 		handlep->vlan_offset != -1 &&
2cd29a
-		tp_snaplen >= (unsigned int) handlep->vlan_offset)
2cd29a
+		snaplen >= (unsigned int) handlep->vlan_offset)
2cd29a
 	{
2cd29a
 		struct vlan_tag *tag;
2cd29a
 
2cd29a
-- 
2cd29a
2.4.3
2cd29a