All of lore.kernel.org
 help / color / mirror / Atom feed
* [libipq] owner of packet, possible patch
@ 2007-03-06 15:39 Jack Bauer
  2007-03-06 15:51 ` Eric Leblond
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jack Bauer @ 2007-03-06 15:39 UTC (permalink / raw)
  To: netfilter

Hi,

I'm a student in computer science and for my master thesis i have to
handle packets in a userspace queue. Libipq works fine for me, except
one information which is missing: the owner of a (transmitted) packet.

With the following two additional lines, the problem seems to be solved:

in file
   include/linux/netfilter_ipv4/ip_queue.h
in
   typedef struct ipq_packet_msg_t
line 33 add:

        unsigned int uid;               /* uid of packet owner*/


in file
   net/ipv4/netfilter/ip_queue.c
line 249 add:

        pmsg->uid             = entry->skb->sk->sk_socket->file->f_uid;


Initial tests have been successful and are showing the correct uid in
ipq_packet_msg_t in userspace. Please tell me, what you think about
this modification.

Since I found some other people who are looking for the same
information, i wonder if there is a possibility to include the uid
field officially in the source of netfilter?!

Regards,
Jack


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-07 14:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 15:39 [libipq] owner of packet, possible patch Jack Bauer
2007-03-06 15:51 ` Eric Leblond
2007-03-06 18:17   ` TheGesus
2007-03-07 14:46     ` Sebastien Tricaud
2007-03-07 13:42 ` Georgi Alexandrov
2007-03-07 13:56 ` Eric Leblond

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.