On Fri, 6 Jan 2006, Willem de Bruijn wrote:
the weird thing is: with netfilter everything works, but with netrx I get a gigantic memory leak. I suspect that no sk_buff gets deallocated. So, my question is: does netif expect me to decrease the skb reference count manually? Or did I truly notice something peculiar?
Yes. kfree_skb() is needed in packet_type handlers when done with the packet.
Also apparently the kernel does not care very much what you return in "all" hooks. The only preserved return code is the last of the protocol specific handlers.
for inspection I added my processing code below. And I tested this on 2.6.14.5. If anyone has an idea what I'm doing wrong, thanks. I understand that traffic is somewhat slow (ahem) on this list, but guess that net-dev is not the proper place for these questions.
Not sure which of the lists is most proper but I think the netdev list is actually more proper.. The linux-net list is mainly about using the stack, not programming within the internals of the stack..
Regards Henrik - : send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html