netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Add UID/GID info to NFQUEUE
@ 2013-12-18 18:04 valentina.giusti
  2013-12-18 18:04 ` [PATCH 1/2] netfilter_queue: enable UID/GID socket info retrieval valentina.giusti
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: valentina.giusti @ 2013-12-18 18:04 UTC (permalink / raw)
  To: netfilter-devel
  Cc: netdev, eric.dumazet, tgraf, jpa, pablo, davem, daniel.wagner,
	Valentina Giusti

From: Valentina Giusti <valentina.giusti@bmw-carit.de>

Hi,

this patchset adds the possibility to get the UID/GID of the socket they belong
with the NFQUEUE target.

The feature is meant to be a helper for network statistics made on a per
application basis.
In fact, letting userspace being able to associate a packet to a UID and GID
couple helps narrowing down the traffic to the application it belongs to.

One could argue that we already have this feature by means of the owner match,
but this is not true for incoming traffic. It could actually be partially true
thanks to commits 41063e9 (ipv4: Early TCP socket demux) and 421b388 (udp: 
ipv4: Add udp early demux), which allow to obtain socket information also for 
incoming TCP and UDP connections. However, as Pablo Neira Ayuso already pointed
out (http://www.spinics.net/lists/netfilter-devel/msg27952.html), enabling the
owner match on INPUT wouldn't be semantically equivalent to when it is used on
OUTPUT, even with the aforementioned early demux commits.

At the Linux Plumbers Conference 2013, there have been quite interesting 
discussions on the topic of network statistics, and it was proposed that it 
would make more sense to use NFQUEUE for this purpose, letting therefore 
userspace use the UID/GID information for application-based statistics purposes.
This way the UID and GID information of the incoming TCP and UDP traffic is not
"wasted" and can be used for more refined statistics.

For more information on what has been said at LPC2013, have a look at:

https://www.youtube.com/watch?v=ulIqVzsC03g
(Updates on 'New Challenges for Linux Network Support',
 Daniel Wagner, BMW Car IT GmbH)
https://www.youtube.com/watch?v=Fi_iyaF7Gw0
(Android netfilter changes,
 John Stultz, Linaro.org)

And also at this article:

https://lwn.net/Articles/517358/

With this patchset I am proposing an implementation that follows up the
discussions that have been made.
Please have a look at it, any comments are welcome.

-- 
Best Regards,
Val

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

end of thread, other threads:[~2013-12-30 22:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-18 18:04 [PATCH 0/2] Add UID/GID info to NFQUEUE valentina.giusti
2013-12-18 18:04 ` [PATCH 1/2] netfilter_queue: enable UID/GID socket info retrieval valentina.giusti
2013-12-18 21:24   ` Florian Westphal
2013-12-19  8:59     ` Valentina Giusti
2013-12-18 18:04 ` [PATCH 2/2] libnetfilter_queue: add support for UID/GID socket info valentina.giusti
2013-12-30 22:39 ` [PATCH 0/2] Add UID/GID info to NFQUEUE JP Abgrall

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