From: Jan Engelhardt <ej@inai.de>
To: Ricardo Robaina <rrobaina@redhat.com>
Cc: audit@vger.kernel.org, linux-kernel@vger.kernel.org,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
paul@paul-moore.com, eparis@redhat.com, pablo@netfilter.org,
kadlec@netfilter.org, fw@strlen.de
Subject: Re: [PATCH v1] audit: include source and destination ports to NETFILTER_PKT
Date: Tue, 23 Sep 2025 01:21:20 +0200 (CEST) [thread overview]
Message-ID: <p4866orr-o8nn-6550-89o7-s3s12s27732q@vanv.qr> (raw)
In-Reply-To: <20250922200942.1534414-1-rrobaina@redhat.com>
On Monday 2025-09-22 22:09, Ricardo Robaina wrote:
>NETFILTER_PKT records show both source and destination
>addresses, in addition to the associated networking protocol.
>However, it lacks the ports information, which is often
>valuable for troubleshooting.
>
>+ switch (ih->protocol) {
>+ case IPPROTO_TCP:
>+ sport = tcp_hdr(skb)->source;
>+ dport = tcp_hdr(skb)->dest;
>+ break;
>+ case IPPROTO_UDP:
>+ sport = udp_hdr(skb)->source;
>+ dport = udp_hdr(skb)->dest;
>+ }
Should be easy enough to add the cases for UDPLITE,
SCTP and DCCP, right?
next prev parent reply other threads:[~2025-09-22 23:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 20:09 Ricardo Robaina
2025-09-22 23:21 ` Jan Engelhardt [this message]
2025-09-23 17:34 ` Ricardo Robaina
2025-09-23 17:44 ` Florian Westphal
2025-09-23 20:11 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p4866orr-o8nn-6550-89o7-s3s12s27732q@vanv.qr \
--to=ej@inai.de \
--cc=audit@vger.kernel.org \
--cc=coreteam@netfilter.org \
--cc=eparis@redhat.com \
--cc=fw@strlen.de \
--cc=kadlec@netfilter.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=paul@paul-moore.com \
--cc=rrobaina@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®