netif_rx

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

 






Hi,

 I am trying to spoof a packet, I have written a kernel module, once it
gets a modified TCP packet(source and dest interchanged, ack seq
interchanged) it calls netif_rx (skb) to inject this into the routing path.
but I am unable to make this packet reach the correct socket. Any clues on
this, can I check some kernel stats to know where and why the packet is
being dropped.
The various reasons cld be :

1. incorrect tcp or ip check sums, i calculate both myself
2. in the skb->dev field i set the value to the value of skb->dev field of
any incoming valid packet :
 when i get the first packet on netfilter pre routing hook -- i do a
memcpy(&my_net_dev, skb->dev, sizeof(struct net_device));
 then for the modified TCP packet i set skb->dev=&my_net_dev. So maybe it
gets dropped cos of some problem here(or is there any obvious problem here
?)

so how do i isolate the problem ? any clues ??

thanks
Amit

"DISCLAIMER: This message is proprietary to Hughes Software Systems Limited
(HSS) and is intended solely for the use of the individual to whom it is
addressed. It may contain  privileged or confidential information and
should not be circulated or used for any purpose other than for what it is
intended. If you have received this message in error, please notify the
originator immediately. If you are not the intended recipient, you are
notified that you are strictly prohibited from using, copying, altering, or
disclosing the contents of this message. HSS accepts no responsibility for
loss or damage arising from the use of the information transmitted by this
email including damage from virus."


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux