On Mon, Sep 22, 2025 at 8:29 PM Jan Engelhardt <e...@inai.de> wrote:
>
>
> 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?
>

Thanks for reviewing this patch, Jan.

Yes, it should. I assume it’s safe to use udp_hdr() for the UDP-Lite
case as well, right?

It seems DCCP has been retired by commit 2a63dd0edf38 (“net: Retire
DCCP socket.”). I’ll work on a V2, adding cases for both UDP-Lite and
SCTP.


Reply via email to