Re: Socket problem using linux as server
Re: Socket problem using linux as server
- Subject: Re: Socket problem using linux as server
- From: "Peter Sichel" <email@hidden>
- Date: Wed, 30 Nov 2005 11:04:18 -0500
On 11/26/05, Justin C. Walker wrote:
>On Nov 23, 2005, at 10:43 , Per Jespersen wrote:
>>But if I try to run server on a linux server and
>> client on MAC, and my connection is NAT'ed, the checksum in my send
>> packages are wrong according to ethereal. This is the case whether
>> I listen on the MAC or on the linux. Does anyone have any ideas?
>> P.s. sorry if this has already been answered earlier, but I was
>> not able to get the search to work, and browsing through years of
>> postings seemed to be a major task :-)
>
>I will guess that you are seeing a red herring. If ethereal is
>running on a system, like most recent Mac OS X variants, that
>supports checksum off-loading (so packets in memory are tagged with
>an indicator telling the stack to avoid computing checksums), it will
>appear that the checksums are wrong. However, the NIC will be doing
>the checksum computation before sending (or after receiving), so
>what's "on the wire" is correct.
I'll second Justin's comment, but also wanted to note there's another
way to help resolve this. You can turn off checksum off-loading using
sysctl (or my own IPNetTunerX) by changing the parameters below from "1"
to "0".
net.link.ether.inet.apple_hwcksum_rx
net.link.ether.inet.apple_hwcksum_tx
Notice there is a nasty bug in Tiger that breaks loopback when you turn
off apple_hwcksum_rx effectively crippling your system (you won't be
able to launch other applications). It's a good idea to leave your
terminal or IPNetTunerX window open so you can put it back when you are
done testing.
I've used this trick myself to debug NAT and Ethernet bridging
problems. If anyone is doing NKE work in this area, the KPI's are a
little misleading. Calling mbuf_outbound_finalize() calculates the
checksum to finalize the packet, but doesn't clear the checksum request
flags. You'll need to call mbuf_inbound_modified() to do that if
there's any chance the packet will be sent to another interface via
bridging, IP forwarding, or loopback. Getting and setting the mbuf
flags doesn't work correctly either since the KPI mask values don't
match the old BSD kernel mask values that are actually used.
Kind Regards,
- Peter Sichel
Sustainable Softworks
www.sustworks.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden