netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kristian Evensen <kristian.evensen@gmail.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: Wrong MAC in redirected packet
Date: Wed, 25 Mar 2009 22:00:59 +0100	[thread overview]
Message-ID: <49CA9B8B.7080605@gmail.com> (raw)
In-Reply-To: <alpine.LSU.2.00.0903252057190.29156@fbirervta.pbzchgretzou.qr>

Jan Engelhardt skrev:
> On Wednesday 2009-03-25 20:56, Kristian Evensen wrote:
>
>   
>> Jan Engelhardt skrev:
>>     
>>> On Wednesday 2009-03-25 20:47, Kristian Evensen wrote:
>>>  
>>>       
>>>> However, I have noticed a similar problem when using my module on incoming
>>>> packets in PREROUTING (on the multihomed receiver), the IP adress is changed
>>>> (accoring to my dmesg-output) but then they are not heard from again.
>>>>    
>>>>         
>>> Probably dropped due to L3 or L4 checksum mismatches. While we try to
>>> change the checksum, I have not verified it for all cases.
>>>
>>>  
>>>       
>> Hm, I am noe sure. I recalculate the checksum (using csum_replace4 for l3 and
>> inet....replace4 for l4) after modifying the destination IP, and when used with
>> OUTPUT the checksum is correct. Since tcpdump/Wireshark outputs the packets
>> before they are modified I haven't been able to verify this though.
>>     
>
> You can use hexdump in the xtables module, or any other form, to
> dump the checksum.
>   
I had completely forgot that, thank you. However, tcpdump tells me that 
the checksum is ok, but I will look into it and simply compare a packet 
that has not been redirected with one that has. Thank you.

-Kristian

  reply	other threads:[~2009-03-25 20:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25 14:27 Wrong MAC in redirected packet Kristian Evensen
2009-03-25 14:33 ` Jan Engelhardt
2009-03-25 15:00   ` Kristian Evensen
2009-03-25 15:04     ` Jan Engelhardt
2009-03-25 15:17       ` Kristian Evensen
2009-03-25 15:20         ` Jan Engelhardt
2009-03-25 19:47       ` Kristian Evensen
2009-03-25 19:48         ` Jan Engelhardt
2009-03-25 19:56           ` Kristian Evensen
2009-03-25 19:57             ` Jan Engelhardt
2009-03-25 21:00               ` Kristian Evensen [this message]
2009-03-26 10:26                 ` Kristian Evensen
2009-03-26 20:07                   ` Jan Engelhardt
2009-03-26 20:54                     ` Kristian Evensen
2009-04-26  9:46                       ` Jan Engelhardt
2009-04-26 16:22                         ` Kristian Evensen
2009-04-26 21:29                           ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49CA9B8B.7080605@gmail.com \
    --to=kristian.evensen@gmail.com \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).