I write a Linux kernel module that receive a UDP packet and then transfer it
out in net device

I register one function in NF_IP_PRE_ROUTING, and another function in

In NF_IP_PRE_ROUTING function, I want to change the destination address and
the source address of the received packet,
new_iph = (struct iphdr *)((*skb)->data);
new_iph->protocol = IPPROTO_GRE;
new_iph->daddr = new_daddr;
new_iph->saddr = new_saddr;
Why that can not transfer this packet to NF_IP_FORWARD?

But if I just only change the destination of the received packet, and keep
the source address unchanged, that can transfer the packet to NF_IP_FORWARD

Anybody can tell me what the difference is?

Thanks in advance!