From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH V4 1/2] netfilter: xt_AUDIT: use consistent ipv4 network offset Date: Wed, 22 Mar 2017 13:56:45 +0100 Message-ID: <20170322125645.GA21654@salvia> References: <20170322111151.GA2766@salvia> <20170322114318.GC9021@madcap2.tricolour.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Netfilter Developer Mailing List , linux-audit@redhat.com, Florian Westphal , Thomas Woerner , Thomas Graf , Eric Paris , Paul Moore , Steve Grubb To: Richard Guy Briggs Return-path: Received: from mail.us.es ([193.147.175.20]:38276 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934079AbdCVM4u (ORCPT ); Wed, 22 Mar 2017 08:56:50 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id D7484137B8E for ; Wed, 22 Mar 2017 13:56:46 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id C85FDDA872 for ; Wed, 22 Mar 2017 13:56:46 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 9EB44DA725 for ; Wed, 22 Mar 2017 13:56:44 +0100 (CET) Content-Disposition: inline In-Reply-To: <20170322114318.GC9021@madcap2.tricolour.ca> Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Wed, Mar 22, 2017 at 07:43:18AM -0400, Richard Guy Briggs wrote: > On 2017-03-22 12:11, Pablo Neira Ayuso wrote: > > On Wed, Mar 22, 2017 at 03:05:36AM -0400, Richard Guy Briggs wrote: > > > 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 > > > --- > > > 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); > > > > This update is completely pointless. > > Its point is to be consistent with audit_ip6() and to prevent further > time consumed by confusion and head-scratching. I know it is slightly > slower with an identical result. > > > If you want I can place it in nf-next, your call. > > I'd prefer to bring it through the audit-next tree to avoid the merge > conflict. No problem. I remove this patchset from my patchwork then.