All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentina Giusti <valentina.giusti@bmw-carit.de>
To: Florian Westphal <fw@strlen.de>
Cc: <netfilter-devel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<jpa@google.com>, <pablo@netfilter.org>,
	<daniel.wagner@bmw-carit.de>
Subject: Re: [PATCH v3 1/2] netfilter_queue: enable UID/GID socket info retrieval
Date: Fri, 20 Dec 2013 15:32:36 +0100	[thread overview]
Message-ID: <52B45504.20608@bmw-carit.de> (raw)
In-Reply-To: <20131220140959.GA29632@breakpoint.cc>

On 12/20/2013 03:09 PM, Florian Westphal wrote:
> valentina.giusti@bmw-carit.de <valentina.giusti@bmw-carit.de> wrote:
>> --- a/net/netfilter/nfnetlink_queue_core.c
>> +++ b/net/netfilter/nfnetlink_queue_core.c
>> @@ -297,6 +297,32 @@ nfqnl_put_packet_info(struct sk_buff *nlskb, struct sk_buff *packet,
>>   	return flags ? nla_put_be32(nlskb, NFQA_SKB_INFO, htonl(flags)) : 0;
>>   }
>>   
>> +static int nfqnl_put_sk_uidgid(struct sk_buff *skb, struct sock *sk)
>> +{
>> +	const struct cred *cred;
>> +
>> +	if (sk->sk_state == TCP_TIME_WAIT)
>> +		return -1;
> I think this should be 'return 0'?
I put return -1 because I think that if userspace has requested to 
receive UID and GID, then it should be dumped only packets that have 
that information available.
Are you suggesting that it should be otherwise?

Thanks,
- Val

  reply	other threads:[~2013-12-20 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 12:33 [PATCH v3 0/2] Add UID/GID info to NFQUEUE valentina.giusti
2013-12-20 12:33 ` [PATCH v3 1/2] netfilter_queue: enable UID/GID socket info retrieval valentina.giusti
2013-12-20 14:09   ` Florian Westphal
2013-12-20 14:32     ` Valentina Giusti [this message]
2013-12-20 15:03       ` Florian Westphal
2013-12-20 15:10         ` Valentina Giusti
2013-12-20 12:33 ` [PATCH v3 2/2] libnetfilter_queue: add support for UID/GID socket info valentina.giusti

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=52B45504.20608@bmw-carit.de \
    --to=valentina.giusti@bmw-carit.de \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=fw@strlen.de \
    --cc=jpa@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@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 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.