Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: use consistent ipv4 network offset in xt_AUDIT

Even though the skb->data pointer has been moved from the link layer
header to the network layer header, use the same method to calculate the
offset in ipv4 and ipv6 routines.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
[PM: munged subject line]
Signed-off-by: Paul Moore <paul@paul-moore.com>

authored by

Richard Guy Briggs and committed by
Paul Moore
0cb88b6f f6276ac9

+1 -1
+1 -1
net/netfilter/xt_AUDIT.c
··· 76 76 struct iphdr _iph; 77 77 const struct iphdr *ih; 78 78 79 - ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); 79 + ih = skb_header_pointer(skb, skb_network_offset(skb), sizeof(_iph), &_iph); 80 80 if (!ih) { 81 81 audit_log_format(ab, " truncated=1"); 82 82 return;