From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Westphal Subject: Re: Timestamps, NFLOG, and ULOG Date: Fri, 22 May 2020 02:21:34 +0200 Message-ID: <20200522002134.GB26949@breakpoint.cc> References: <20200521232626.GA26949@breakpoint.cc> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: Sender: netfilter-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Korodev Cc: Florian Westphal , netfilter@vger.kernel.org Korodev wrote: > On Thu, May 21, 2020 at 6:26 PM Florian Westphal wrote: > > Its expected. If you want rx timestamps you should set > > SO_TIMESTAMP(NS) socket option, > > Thank you for your reply. My understanding is that SO_TIMESTAMP is a > socket option I could set for an application that I control, but how > would I go about enabling that such that IPTables, Netlink, and ULOGd > are aware? Setting this option makes the kernel record a timestamp at reception time for all packets it receives (it won't know the socket the packet will be delivered to yet, so it can't do this in a fine-grained way). This is off by default for performance reasons. Ideally ulogd should have an option to enable this (it doesn't have one). > I assumed I would at least get the software timestamp at > which the kernel received the packet. No, the kernel does not record a timestamp by default.