Re: Regarding write send a packet to network that received in NF_IP_PRE_ROUTING

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

 



Hi,

Please get the source code for the issue. i have tried to update the
IP header of the received packet. So system should route that packet
to network. But system does not forward packet to network. is this
they way to forward a packet to network by updating the IP header. or
we need to update other parameter of the skbuff.

Thanks,
Padmalochan

On Fri, Jul 23, 2010 at 12:54 PM, Jan Engelhardt <jengelh@xxxxxxxxxx> wrote:
>
> On Tuesday 2010-07-20 12:49, Padmalochan Moharana wrote:
>>i am facing problem during sending a packet that received in
>>NF_IP_PRE_ROUTNG hook to network again  .
>>After receive a packet i have update the source and destination IP.
>>then i have recalculate the checksum for IP and UDP layer. then i have
>>to send that packet to network by using below command.
>>
>>       NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, skb->dev, dst_output);
>>       ret = NF_STOLEN;
>>       return ret;
>>
>>But after loading my module kernel hang when it receive any data from peer.
>
> Without the code, nobody can tell.
>

Attachment: forward.c
Description: Binary data


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux