bpf, events: fix offset in skb copy handler
[cascardo/linux.git] / net / core / filter.c
index 0b52135..5708999 100644 (file)
@@ -2026,9 +2026,9 @@ bool bpf_helper_changes_skb_data(void *func)
 }
 
 static unsigned long bpf_skb_copy(void *dst_buff, const void *skb,
-                                 unsigned long len)
+                                 unsigned long off, unsigned long len)
 {
-       void *ptr = skb_header_pointer(skb, 0, len, dst_buff);
+       void *ptr = skb_header_pointer(skb, off, len, dst_buff);
 
        if (unlikely(!ptr))
                return len;