All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Giacomo <delleceste@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: netlink callback and socket buffer.
Date: Sat, 14 Feb 2009 18:16:29 +0100	[thread overview]
Message-ID: <4996FC6D.6020705@netfilter.org> (raw)
In-Reply-To: <885896af0902131235q68b79efbu5c25d29fd9bd1661@mail.gmail.com>

Giacomo wrote:
> Good evening to everybody.
> 
> In recent kernels (>=2.6.24) netlink_kernel_create() callback function
> has the following signature:
> 
> 
> (void *) function(struct sk_buff* skb);
> 
> while before it was
> 
> (void  *) function(struct sock *skctrl, int len)
> 
> In the latter, i used to call skb_dequeue, obtain the skb and then,
> once data was extracted, I used
> to kfree_skb(skb); where skb is a sk_buff* obtained by skb_dequeue();
> 
> Now (with the (void *) function(struct sk_buff* skb)  callback) I get
> data from skb but DO NOT HAVE
> TO kfree_skb() it...
> 
> Is it true?  Is it automatically freed by the kernel once the callback returns?

Right, look at netlink_unicast_kernel() in af_netlink.c

-- 
"Los honestos son inadaptados sociales" -- Les Luthiers

      reply	other threads:[~2009-02-14 17:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-13 20:35 netlink callback and socket buffer Giacomo
2009-02-14 17:16 ` Pablo Neira Ayuso [this message]

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=4996FC6D.6020705@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=delleceste@gmail.com \
    --cc=netfilter-devel@vger.kernel.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.