lkml.org 
[lkml]   [2008]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How to find origin PID of a sk_buff in iptables match?
From
Date

> Also, I noticed that in my match code in OUTPUT chain, the current
> task seemed to the originator I want (ping test). However, I'm not
> quite sure whether this is always true?

Well, nobody answered.

Anyway, as suspected with TCP connections it seems that current->pid
produces 0 very often after the first initial packet (SYN). I take
this to mean, that the TCP engine is being executed on some interrupt
context?

Now I'm wondering how SELINUX manages to get the secmark right, as the
code in iptables seems to eventually need the current task context?
Something tricky being made using the SECMARK and CONNSECMARK? It
seems to trust, that at least the first packet has the current task
context properly set and the remaining packets of the connection don't
need current task?

I guess I have to dug deeper in this (emulate what SELINUX does). Or
can someone point to a tutorial description on how to reliably
associate each outgoing packet with some originating task context?


\
 
 \ /
  Last update: 2008-09-05 13:23    [W:0.027 / U:13.076 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site