Adding a function to ip_output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi all,

I added some lines of code in ip_output to define a new function ( which
is a module ), and added that function name in netsyms.c as directed by a
book on the Net.. this is for injecting packets in the kernel, about which
I wrote some days ago.

This line is added in the beginning of the file ip_output.c

int (*test_function)(struct sk_buff *)=0;

The following lines are added in function ip_finish_output2

// original definitions

 if((*test_function)(skb))
 {       kfree_skb(skb);
         return 0;}
 else
 {
// original code



The kernel compiles, but it is having problems as on restarting, there is
some stack problem in rpc.statd and the comp hangs.

Could anyone guide me as what maybe causing trouble. As the module is not
loaded on startup, I guess that won't be a problem.

Regards,

Vasu
III yr undergrad ( EE )


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux