From: Eric Leblond <eric@inl.fr>
To: Jack Bauer <mlsubscriber@gmail.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: [libipq] owner of packet, possible patch
Date: Tue, 06 Mar 2007 16:51:47 +0100 [thread overview]
Message-ID: <1173196307.23222.17.camel@localhost> (raw)
In-Reply-To: <619420780703060739k18ec820dnc8f681b8fc517825@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]
Le mardi 06 mars 2007 à 16:39 +0100, Jack Bauer a écrit :
> 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.
ipqueue is deprecated in favor of libnetfilter_queue and I'm quiet sure
that no new functionnalities will be pushed to upstream. You may try to
port this to libnetfilter_queue and send your patch to netfilter-devel.
> 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;
I don't think this information will be available for non-local packet
(What happens if you queue a packet in FORWARD chain ?). You need at
least to protect the assignement.
> 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?!
Don't think so.
BR,
--
Eric Leblond <eric@inl.fr>
INL
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-03-06 15:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 15:39 [libipq] owner of packet, possible patch Jack Bauer
2007-03-06 15:51 ` Eric Leblond [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1173196307.23222.17.camel@localhost \
--to=eric@inl.fr \
--cc=mlsubscriber@gmail.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox