Messages in this thread | | | Date | Fri, 17 Jun 2005 00:53:23 +0200 | From | Jesper Juhl <> | Subject | Re: Shouldn't we be using alloc_skb/kfree_skb in net/ipv4/netfilter/ipt_recent.c::ip_recent_ctrl ? |
| |
On 6/17/05, David S. Miller <davem@davemloft.net> wrote: > From: Jesper Juhl <juhl-lkml@dif.dk> > Date: Fri, 17 Jun 2005 00:36:04 +0200 (CEST) > > > I was just grep'ing through the source looking for places where skb's > > might be freed by plain kfree() and, amongst other things, I noticed > > net/ipv4/netfilter/ipt_recent.c::ip_recent_ctrl, where a struct sk_buff* > > is defined and then storage for it is allocated with kmalloc() and freed > > with kfree(), and I'm wondering if we shouldn't be using > > alloc_skb/kfree_skb instead (as pr the patch below)? Or is there some good > > reason for doing it the way it's currently done? > > It's using it to send a dummy packet to the patch function. > It is gross, but it does work because it allocated it's own > private data area to skb->nh.iph. > > Just leave it alone for now, ipt_recent is gross and full of many > errors and bug, and thus stands to have a rewrite. Patrick McHardy > said he will try to do that. > Ok. I was just about to send the patch off to Andrew based on Stephen's reply, but I'll hold off on that then.
-- Jesper Juhl <jesper.juhl@gmail.com> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |