How to modify source ip address of an incoming udp packge which is sent by row socket from local
Hi all,
I have some trouble in modifing source ip address of an incoming udp packet which is sent by row socket from localhost.
I have added a filter on FWPM_LAYER_INBOUND_TRANSPORT_V4 layer and the filter did catch the packet. But when I get the pointer of IP header of UDP header and watch them in Windbg, It seems that many fields of IP header ( such as checksum, ttl) are zero and many fields of UDP header( such as checksum, src port, dst port) also are zero. I have changed the source ip address (without calculate IP header checksum and UDP header checksum) and reinjected it to tcp/ip stack. But my UDP client can't not receive the modified packet. What the problem?
In addition, my code works well if the udp packet is sent by normal socket. In this case, the filelds of IP header and UDP header both right. And I recalculate the checksum of IP header and UDP header after modify the packet.
Are there some special measure should be take when filtering raw socket?
Thank you!

