Skip to contentSkip to conversation

Obtaining process which generated packet

DISCUSSION W. Michael Petullo 1 participant 1 message Oct 2, 2015

lore
Share & tools
lore
#0 lore raw

I am interested in identifying the process (if any) responsible for creating a packet from within a netfilter module. Specifically, I would like to (from within the kernel) inspect the appropriate process's task structure and make a decision based on what I find. How might I do this?

Another user asked a similar question some time ago:

	http://lists.netfilter.org/pipermail/netfilter/2005-December/064225.html

However, I did not find a conclusive answer.

One of the responders stated this of the suggested use of sk_buff->sock->socket->file->fown_struct->pid:

"...and if using SMP you can't use it at all in netfilter context."

I was unable to follow why this would be the case. Would someone be willing to elaborate on this too?

Thank you,

Signature · 3 lines
Mike

:wq