* Pleeeeeeeease help: question about ip_queue
@ 2006-10-10 14:41 Mohammad Farooq
2006-10-10 15:36 ` aoliva
0 siblings, 1 reply; 4+ messages in thread
From: Mohammad Farooq @ 2006-10-10 14:41 UTC (permalink / raw)
To: netfilter
Hi,
I hope someone familiar with ip_queue can clarify the functioning of the
ip_queue. I wrote a simple test program, what all it does read packets
from the queue, hold a packet and accept it later. Here is the logic:
read message from the ip_queue
save message id
read message from the ip_queue
accept current message
read message from the ip_queue
accept current message
read message from the ip_queue
accept current message
read message from the ip_queue
accept current message
read message from the ip_queue
accept current message
**accept saved message using the saved message id
accept current message
read message from the ip_queue
accept current message
When I accept the saved message, it just disappears. My question is, can
we hold packets and accept them sometimes in the future? Thanks.
MF
Note: here is my iptable rules:
iptables -t nat -A PREROUTING -p udp -s 192.168.82.140 -d 192.168.75.51
--dport 7862 -j DNAT --to 192.168.82.140:7862
iptables -t nat -A POSTROUTING -p udp -s 192.168.82.140 -d
192.168.82.140 --dport 7862 -j SNAT --to 192.168.75.51:7862
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -p udp -j QUEUE
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Pleeeeeeeease help: question about ip_queue
2006-10-10 14:41 Pleeeeeeeease help: question about ip_queue Mohammad Farooq
@ 2006-10-10 15:36 ` aoliva
2006-10-10 16:26 ` Mohammad Farooq
0 siblings, 1 reply; 4+ messages in thread
From: aoliva @ 2006-10-10 15:36 UTC (permalink / raw)
To: Mohammad Farooq; +Cc: netfilter
Hi all,
I think you can do what you want by storing the message in the module,
dropping the current one and after the specific time sending it again.
Regards
Antonio
Mohammad Farooq wrote:
> Hi,
>
> I hope someone familiar with ip_queue can clarify the functioning of the
> ip_queue. I wrote a simple test program, what all it does read packets
> from the queue, hold a packet and accept it later. Here is the logic:
>
> read message from the ip_queue
> save message id
> read message from the ip_queue
> accept current message
> read message from the ip_queue
> accept current message
> read message from the ip_queue
> accept current message
> read message from the ip_queue
> accept current message
> read message from the ip_queue
> accept current message
> **accept saved message using the saved message id
> accept current message
> read message from the ip_queue
> accept current message
>
> When I accept the saved message, it just disappears. My question is, can
> we hold packets and accept them sometimes in the future? Thanks.
>
> MF
>
> Note: here is my iptable rules:
> iptables -t nat -A PREROUTING -p udp -s 192.168.82.140 -d 192.168.75.51
> --dport 7862 -j DNAT --to 192.168.82.140:7862
> iptables -t nat -A POSTROUTING -p udp -s 192.168.82.140 -d
> 192.168.82.140 --dport 7862 -j SNAT --to 192.168.75.51:7862
>
> echo 1 > /proc/sys/net/ipv4/ip_forward
> iptables -A FORWARD -p udp -j QUEUE
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Pleeeeeeeease help: question about ip_queue
2006-10-10 15:36 ` aoliva
@ 2006-10-10 16:26 ` Mohammad Farooq
2006-10-10 20:26 ` Mohammad Farooq
0 siblings, 1 reply; 4+ messages in thread
From: Mohammad Farooq @ 2006-10-10 16:26 UTC (permalink / raw)
To: aoliva; +Cc: netfilter
Hi Antonio,
Thanks for the reply. Pardon my ignorance, once I drop the current
packet, how can I resend the the saved packet through the ip_queue in
the future? I don't see any API in libipq which allows that. Could you
please elaborate. Thanks.
MF
On Tue, 2006-10-10 at 17:36 +0200, aoliva wrote:
> Hi all,
> I think you can do what you want by storing the message in the module,
> dropping the current one and after the specific time sending it again.
>
> Regards
> Antonio
>
>
>
> Mohammad Farooq wrote:
> > Hi,
> >
> > I hope someone familiar with ip_queue can clarify the functioning of the
> > ip_queue. I wrote a simple test program, what all it does read packets
> > from the queue, hold a packet and accept it later. Here is the logic:
> >
> > read message from the ip_queue
> > save message id
> > read message from the ip_queue
> > accept current message
> > read message from the ip_queue
> > accept current message
> > read message from the ip_queue
> > accept current message
> > read message from the ip_queue
> > accept current message
> > read message from the ip_queue
> > accept current message
> > **accept saved message using the saved message id
> > accept current message
> > read message from the ip_queue
> > accept current message
> >
> > When I accept the saved message, it just disappears. My question is, can
> > we hold packets and accept them sometimes in the future? Thanks.
> >
> > MF
> >
> > Note: here is my iptable rules:
> > iptables -t nat -A PREROUTING -p udp -s 192.168.82.140 -d 192.168.75.51
> > --dport 7862 -j DNAT --to 192.168.82.140:7862
> > iptables -t nat -A POSTROUTING -p udp -s 192.168.82.140 -d
> > 192.168.82.140 --dport 7862 -j SNAT --to 192.168.75.51:7862
> >
> > echo 1 > /proc/sys/net/ipv4/ip_forward
> > iptables -A FORWARD -p udp -j QUEUE
> >
> >
> >
> >
> >
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Pleeeeeeeease help: question about ip_queue
2006-10-10 16:26 ` Mohammad Farooq
@ 2006-10-10 20:26 ` Mohammad Farooq
0 siblings, 0 replies; 4+ messages in thread
From: Mohammad Farooq @ 2006-10-10 20:26 UTC (permalink / raw)
To: mfarooq100; +Cc: netfilter
I have performed a different test. I read 5 message from the queue and
save message ids of all five of them. Then I accepted all five message
in the order they read. The first message reaches its destination and
the other four are dropped. I would really appreciate if someone can
explains the inner working of the ip_queue. Is this a bug in the
ip_queue implementation? Thanks.
MF
On Tue, 2006-10-10 at 11:26 -0500, Mohammad Farooq wrote:
> Hi Antonio,
>
> Thanks for the reply. Pardon my ignorance, once I drop the current
> packet, how can I resend the the saved packet through the ip_queue in
> the future? I don't see any API in libipq which allows that. Could you
> please elaborate. Thanks.
>
> MF
>
> On Tue, 2006-10-10 at 17:36 +0200, aoliva wrote:
> > Hi all,
> > I think you can do what you want by storing the message in the module,
> > dropping the current one and after the specific time sending it again.
> >
> > Regards
> > Antonio
> >
> >
> >
> > Mohammad Farooq wrote:
> > > Hi,
> > >
> > > I hope someone familiar with ip_queue can clarify the functioning of the
> > > ip_queue. I wrote a simple test program, what all it does read packets
> > > from the queue, hold a packet and accept it later. Here is the logic:
> > >
> > > read message from the ip_queue
> > > save message id
> > > read message from the ip_queue
> > > accept current message
> > > read message from the ip_queue
> > > accept current message
> > > read message from the ip_queue
> > > accept current message
> > > read message from the ip_queue
> > > accept current message
> > > read message from the ip_queue
> > > accept current message
> > > **accept saved message using the saved message id
> > > accept current message
> > > read message from the ip_queue
> > > accept current message
> > >
> > > When I accept the saved message, it just disappears. My question is, can
> > > we hold packets and accept them sometimes in the future? Thanks.
> > >
> > > MF
> > >
> > > Note: here is my iptable rules:
> > > iptables -t nat -A PREROUTING -p udp -s 192.168.82.140 -d 192.168.75.51
> > > --dport 7862 -j DNAT --to 192.168.82.140:7862
> > > iptables -t nat -A POSTROUTING -p udp -s 192.168.82.140 -d
> > > 192.168.82.140 --dport 7862 -j SNAT --to 192.168.75.51:7862
> > >
> > > echo 1 > /proc/sys/net/ipv4/ip_forward
> > > iptables -A FORWARD -p udp -j QUEUE
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-10-10 20:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-10 14:41 Pleeeeeeeease help: question about ip_queue Mohammad Farooq
2006-10-10 15:36 ` aoliva
2006-10-10 16:26 ` Mohammad Farooq
2006-10-10 20:26 ` Mohammad Farooq
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.