Re: how can I modify the network packet payload?
- From: jimmy <jimmy.askwhy@xxxxxxxxx>
- Date: Wed, 29 Oct 2008 20:52:08 -0700 (PDT)
On Oct 24, 7:13 am, David Schwartz <dav...@xxxxxxxxxxxxx> wrote:
On Oct 23, 7:00 am, jimmy <jimmy.ask...@xxxxxxxxx> wrote:
yeah I use the ipq_set_verdict as below:
status = ipq_set_verdict(h, m->packet_id, NF_ACCEPT, 0, NULL);
Umm, no wonder. You modified your copy of the packet data, but never
did anything with the modified data!
I'm wondering whether the ipq_set_mode is the problem since I use
IPQ_COPY_PACKET. I don't know if there are other options.
I use the following the lines in front of the previous codes.
h = ipq_create_handle(0, PF_INET);
if (!h)
die(h);
status = ipq_set_mode(h, IPQ_COPY_PACKET, BUFSIZE);
if (status < 0)
die(h);
Can any one give some hints?
1) You got a copy of the packet.
2) You modified your copy.
3) You didn't do anything with your copy.
Read the docs for ipq_set_verdict carefully.
DS
Sorry. It has some new problem.
The packet data is changed when I send and receive both on the
localhost. The tcp packets are changed, sent and recv all through
127.0.0.1. It works well on the same laptop.
But when I send and recv at different laptop through ad hoc network,
the receiver cannot receive anything. At the sender side, the packets
seem changed and sent out. And after 6 or 7 packets sent out, the
sender seems hanged there and will not send any more packets.
I impose the iptable to capture the OUTPUT tcp packet at the sender
side.
I only change the tcp data with the condition of my defined string,
like the data has a string of "today" (then I change only the "today"
string). I'm not sure whether the capture and modification process
stops any tcp communication packets which help to maintain the tcp
connection.
Anybody has an idea of what may why the receiver cannot receive the
modified packet?
.
- Follow-Ups:
- Re: how can I modify the network packet payload?
- From: David Schwartz
- Re: how can I modify the network packet payload?
- References:
- how can I modify the network packet payload?
- From: jimmy
- Re: how can I modify the network packet payload?
- From: David Schwartz
- Re: how can I modify the network packet payload?
- From: jimmy
- Re: how can I modify the network packet payload?
- From: David Schwartz
- how can I modify the network packet payload?
- Prev by Date: Re: BIND -- can't register nameserver
- Next by Date: Re: One web server, multiple domains; a slight twist
- Previous by thread: Re: how can I modify the network packet payload?
- Next by thread: Re: how can I modify the network packet payload?
- Index(es):
Relevant Pages
|