aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_AUDIT.c
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2017-05-02 10:16:04 -0400
committerPaul Moore <paul@paul-moore.com>2017-05-02 10:16:04 -0400
commit0cb88b6ff054ccfa30e0fd7f7b42ee9f088db432 (patch)
treeb85cf2ecd708c865ff852a85764ad8b75a07f477 /net/netfilter/xt_AUDIT.c
parentaudit: log module name on delete_module (diff)
downloadlinux-dev-0cb88b6ff054ccfa30e0fd7f7b42ee9f088db432.tar.xz
linux-dev-0cb88b6ff054ccfa30e0fd7f7b42ee9f088db432.zip
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>
Diffstat (limited to 'net/netfilter/xt_AUDIT.c')
-rw-r--r--net/netfilter/xt_AUDIT.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_AUDIT.c b/net/netfilter/xt_AUDIT.c
index 19247a17e511..5181f69ec9bf 100644
--- a/net/netfilter/xt_AUDIT.c
+++ b/net/netfilter/xt_AUDIT.c
@@ -76,7 +76,7 @@ static void audit_ip4(struct audit_buffer *ab, struct sk_buff *skb)
struct iphdr _iph;
const struct iphdr *ih;
- ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph);
+ ih = skb_header_pointer(skb, skb_network_offset(skb), sizeof(_iph), &_iph);
if (!ih) {
audit_log_format(ab, " truncated=1");
return;