netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 1/2] netfilter: xt_AUDIT: use consistent ipv4 network offset
@ 2017-03-22  7:05 Richard Guy Briggs
  2017-03-22  7:05 ` [PATCH V4 2/2] audit: normalize NETFILTER_PKT Richard Guy Briggs
  2017-03-22 11:11 ` [PATCH V4 1/2] netfilter: xt_AUDIT: use consistent ipv4 network offset Pablo Neira Ayuso
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Guy Briggs @ 2017-03-22  7:05 UTC (permalink / raw)
  To: Netfilter Developer Mailing List, linux-audit
  Cc: Richard Guy Briggs, Florian Westphal, Thomas Woerner, Thomas Graf,
	Eric Paris, Paul Moore, Steve Grubb

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>
---
 net/netfilter/xt_AUDIT.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/xt_AUDIT.c b/net/netfilter/xt_AUDIT.c
index 4973cbd..cdb7cee 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;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-03-23 18:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-22  7:05 [PATCH V4 1/2] netfilter: xt_AUDIT: use consistent ipv4 network offset Richard Guy Briggs
2017-03-22  7:05 ` [PATCH V4 2/2] audit: normalize NETFILTER_PKT Richard Guy Briggs
2017-03-23 18:44   ` Paul Moore
2017-03-22 11:11 ` [PATCH V4 1/2] netfilter: xt_AUDIT: use consistent ipv4 network offset Pablo Neira Ayuso
2017-03-22 11:43   ` Richard Guy Briggs
2017-03-22 12:56     ` Pablo Neira Ayuso
2017-03-23 18:44     ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).