netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Help required in a part of transport layer
@ 2019-07-12  6:21 Rakesh Beck
  0 siblings, 0 replies; only message in thread
From: Rakesh Beck @ 2019-07-12  6:21 UTC (permalink / raw)
  To: netdev

Hi,
I am looking for some help.

I am trying to intercept packet using netfilter hooks
(NF_IP_LOCAL_OUT) and using source port and destination port from
SK_BUFF, to figure out which processes are using it but I am unable to
do so.

I am only concerned about packets which are sent and received locally.
Therefore, I looked into __udp4_lib_rcv (net/ipv4/udp.c) to see how
packet is assigned to socket and from socket to infer which process is
using it (For receiver). I called udp4_lib_lookup_skb from netfilter
hook but it causes kernel null pointer deference.
For sender, I was thinking to add sending  process pid to sk_buff's secmark.

Is this the correct way to do or is there any other way? kindly point
me to resources which will help me achieve my goal.

Thanks,
Rakesh

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-12  6:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12  6:21 Help required in a part of transport layer Rakesh Beck

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).