[RTnet-developers] Trying to fix bug in RTNET v0.7
Brought to you by:
bet-frogger,
kiszka
|
From: <alk...@ot...> - 2006-05-11 12:19:11
|
Hello again, I am trying to trace the root-cause of a failure to execute "callback_func(rt_socket_context(sock), callback_arg);" source file: af_packet.c RTNET v0.7 Through the use of my solution/tool I am working on, and some debug messages, I have reached the conclusion that this only happens when "ifindex != 0" and as a result the socketbuffer memory is de-allocated (kfree_rtskb(skb)). callback_func fails to execute because ifindex seems not to have been initialized and prints a random value. Now this means that in ifindex=sock->prot.packet.ifindex, sock->prot.packet.ifindex is not initialized either, maybe due to the uncommon (hardcore would be more precise) way of typecasting "rtpacket_type pt" and initializing "sock"...here take a look: struct rtsocket *sock = (struct rtsocket *)(((u8 *)pt) - ((u8 *)&(struct rtsocket *)0)->prot.socket)); and it all comes down to "pt"...what goes so wrong with "pt" to (indirectly)contain a non-initialized pointer to ifindex??? Thank you even reading through this mumbo-jumbo! |