* Packet Lost
@ 2006-06-08 17:37 Vasantha Kumar Puttappa
2006-06-19 14:55 ` Patrick McHardy
0 siblings, 1 reply; 7+ messages in thread
From: Vasantha Kumar Puttappa @ 2006-06-08 17:37 UTC (permalink / raw)
To: netfilter-devel
Hi,
I am working on a small application using iptables/libipq. In this, the
application would capture a specific packets based on the destination IP
address. Then I encapsulate this IP packet inside another new IP packet.
My problem is that the encapsulation part works fine in
kernel-2.6.11-6(mandriva 2005) and IPtables V 1.2.9.
(I can capture encapsulated packets using tcpdump at the sender side i.e,
packets are being put on to the network)
But this doesn't work in kernel-2.6.12-12 and IPtables-1.3.5
(even though there are no erros after callig ipq_set_verdict, the packets
are not being put on to the channel. The packets are getting lost after
the call to ipq_set_verdict)
please let me know if you need more information
Please help me out here
Thanx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Packet Lost
2006-06-08 17:37 Packet Lost Vasantha Kumar Puttappa
@ 2006-06-19 14:55 ` Patrick McHardy
2006-06-19 19:23 ` Vasantha Kumar Puttappa
0 siblings, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2006-06-19 14:55 UTC (permalink / raw)
To: Vasantha Kumar Puttappa; +Cc: netfilter-devel
Vasantha Kumar Puttappa wrote:
> Hi,
>
> I am working on a small application using iptables/libipq. In this, the
> application would capture a specific packets based on the destination IP
> address. Then I encapsulate this IP packet inside another new IP packet.
>
> My problem is that the encapsulation part works fine in
> kernel-2.6.11-6(mandriva 2005) and IPtables V 1.2.9.
> (I can capture encapsulated packets using tcpdump at the sender side i.e,
> packets are being put on to the network)
>
>
> But this doesn't work in kernel-2.6.12-12 and IPtables-1.3.5
> (even though there are no erros after callig ipq_set_verdict, the packets
> are not being put on to the channel. The packets are getting lost after
> the call to ipq_set_verdict)
>
> please let me know if you need more information
IIRC some old versions accidentally fixed up broken checksums
they received from userspace and this is not done anymore.
Do your packets have correct checksums when sent from userspace
to the kernel?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Packet Lost
2006-06-19 14:55 ` Patrick McHardy
@ 2006-06-19 19:23 ` Vasantha Kumar Puttappa
2006-06-19 19:32 ` Patrick McHardy
0 siblings, 1 reply; 7+ messages in thread
From: Vasantha Kumar Puttappa @ 2006-06-19 19:23 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Vasantha Kumar Puttappa, netfilter-devel
> Vasantha Kumar Puttappa wrote:
>> Hi,
>>
>> I am working on a small application using iptables/libipq. In this,
>> the
>> application would capture a specific packets based on the destination IP
>> address. Then I encapsulate this IP packet inside another new IP packet.
>>
>> My problem is that the encapsulation part works fine in
>> kernel-2.6.11-6(mandriva 2005) and IPtables V 1.2.9.
>> (I can capture encapsulated packets using tcpdump at the sender side
>> i.e,
>> packets are being put on to the network)
>>
>>
>> But this doesn't work in kernel-2.6.12-12 and IPtables-1.3.5
>> (even though there are no erros after callig ipq_set_verdict, the
>> packets
>> are not being put on to the channel. The packets are getting lost after
>> the call to ipq_set_verdict)
>>
>> please let me know if you need more information
>
> IIRC some old versions accidentally fixed up broken checksums
> they received from userspace and this is not done anymore.
> Do your packets have correct checksums when sent from userspace
> to the kernel?
>
>
ya my checksum calculation is correct. If my checksum is wrong, it would
have been detected by tcpdump or ethereal(in 2.6.11-6).
Any suggestions ?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Packet Lost
2006-06-19 19:23 ` Vasantha Kumar Puttappa
@ 2006-06-19 19:32 ` Patrick McHardy
2006-06-20 5:26 ` Vasantha Kumar Puttappa
2006-06-20 6:50 ` TCP connection and interface down Vasantha Kumar Puttappa
0 siblings, 2 replies; 7+ messages in thread
From: Patrick McHardy @ 2006-06-19 19:32 UTC (permalink / raw)
To: Vasantha Kumar Puttappa; +Cc: netfilter-devel
Vasantha Kumar Puttappa wrote:
>>IIRC some old versions accidentally fixed up broken checksums
>>they received from userspace and this is not done anymore.
>>Do your packets have correct checksums when sent from userspace
>>to the kernel?
>>
>
> ya my checksum calculation is correct. If my checksum is wrong, it would
> have been detected by tcpdump or ethereal(in 2.6.11-6).
No it wouldn't have been, thats what I'm saying. Old ipq versions
silently fixed broken checksums. Depending on the hook you're queueing
packets at they might get dropped locally if the checksum is corrupt.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Packet Lost
2006-06-19 19:32 ` Patrick McHardy
@ 2006-06-20 5:26 ` Vasantha Kumar Puttappa
2006-06-20 13:51 ` Patrick McHardy
2006-06-20 6:50 ` TCP connection and interface down Vasantha Kumar Puttappa
1 sibling, 1 reply; 7+ messages in thread
From: Vasantha Kumar Puttappa @ 2006-06-20 5:26 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Vasantha Kumar Puttappa, netfilter-devel
Hi,
Actually I did verified my calculated checksum value with the checksum
value present in the actual transmitted packet(using ethereal,
kernel-2.6.11-6), and the values are same.
Here is my checksum code, please let me if something is wrong.
**********************
// To calculate the new check sum
unsigned short ip_sum_calc(unsigned short *addr,int len)
{
int nleft = len;
int sum = 0;
unsigned short *w = addr;
unsigned short answer = 0;
while (nleft > 1)
{
sum += *w++;
nleft -= 2;
}
if (nleft == 1)
{
*(unsigned char *)(&answer) = *(unsigned char *) w;
sum += answer;
}
sum = (sum >> 16) + (sum & 0xffff);
sum += (sum >> 16);
answer = ~sum;
return answer;
}
***********************
> Vasantha Kumar Puttappa wrote:
>>>IIRC some old versions accidentally fixed up broken checksums
>>>they received from userspace and this is not done anymore.
>>>Do your packets have correct checksums when sent from userspace
>>>to the kernel?
>>>
>>
>> ya my checksum calculation is correct. If my checksum is wrong, it would
>> have been detected by tcpdump or ethereal(in 2.6.11-6).
>
> No it wouldn't have been, thats what I'm saying. Old ipq versions
> silently fixed broken checksums. Depending on the hook you're queueing
> packets at they might get dropped locally if the checksum is corrupt.
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Packet Lost
2006-06-20 5:26 ` Vasantha Kumar Puttappa
@ 2006-06-20 13:51 ` Patrick McHardy
0 siblings, 0 replies; 7+ messages in thread
From: Patrick McHardy @ 2006-06-20 13:51 UTC (permalink / raw)
To: Vasantha Kumar Puttappa; +Cc: netfilter-devel
Vasantha Kumar Puttappa wrote:
> Hi,
> Actually I did verified my calculated checksum value with the checksum
> value present in the actual transmitted packet(using ethereal,
> kernel-2.6.11-6), and the values are same.
OK. Then please describe what you're doing in more detail (at what hook
are you queueing, what are you doing to the packet, what is the last
spot you can see the packet, ...). Try to add some LOG rules to see
if the packet really is dropped by ip_queue or later in the stack.
^ permalink raw reply [flat|nested] 7+ messages in thread
* TCP connection and interface down
2006-06-19 19:32 ` Patrick McHardy
2006-06-20 5:26 ` Vasantha Kumar Puttappa
@ 2006-06-20 6:50 ` Vasantha Kumar Puttappa
1 sibling, 0 replies; 7+ messages in thread
From: Vasantha Kumar Puttappa @ 2006-06-20 6:50 UTC (permalink / raw)
To: netfilter-devel
Hi,
Suppose I have an active tcp connection(web browser) bounded to an
interface X. Whenever this interface goes down, this will be notified by
the kernel stack to the transport layer and the tcp application will
stop sending packets till interface becomes active.
My questions is that , is it possible to allow tcp applications to keep
on sending packets even after interface goes down. So, that I can catch
packets using IPtables and do whatever manipulation I would like to do.
Also I have another interface to send these manipulated packets.
Guide me,
Thanx in advance.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-06-20 13:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-08 17:37 Packet Lost Vasantha Kumar Puttappa
2006-06-19 14:55 ` Patrick McHardy
2006-06-19 19:23 ` Vasantha Kumar Puttappa
2006-06-19 19:32 ` Patrick McHardy
2006-06-20 5:26 ` Vasantha Kumar Puttappa
2006-06-20 13:51 ` Patrick McHardy
2006-06-20 6:50 ` TCP connection and interface down Vasantha Kumar Puttappa
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.