1

I'm having a strange issue. In linux I have two windows open. one running tcpdump and one running curl. I used curl to try to make a connection to local host and tcpdump logs invalid checksum errors. This is the log from the tcpdump window:

bash-4.2# tcpdump -evvvt -i lo
tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
00:00:00:00:00:00 (oui Ethernet) > 00:00:00:00:00:00 (oui Ethernet), ethertype
IPv4 (0x0800), length 74: (tos 0x0, ttl 64, id 18215, offset 0, flags [DF], 
proto TCP (6), length 60)
localhost.37550 > localhost.http: Flags [S], cksum 0xfe30 (incorrect -> 0x5d4b), 
seq 112438199, win 32792, options [mss 16396,sackOK,TS val 4648080 ecr 0,nop,wscale 9], length 0
00:00:00:00:00:00 (oui Ethernet) > 00:00:00:00:00:00 (oui Ethernet), ethertype 
IPv4 (0x0800), length 54: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
localhost.http > localhost.37550: Flags [R.], cksum 0x6c64 (correct), seq 0, ack 112438200, win 0, length 0

And the curl window offers nothing exciting to see. If I used max verbosity, all I get is connecting to 127.0.0.1. then it immediately terminates with couldn't connect to host.

I then use ethtool -k to see what parameters I can adjust to disable offloading since many people claim my problem is because of offloading. These are the parameters after the adjustments I could make:

Offload parameters for lo:                                                                      
rx-checksumming: on                                                                             
tx-checksumming: on                                                                             
scatter-gather: on                                                                              
tcp-segmentation-offload: off                                                                   
udp-fragmentation-offload: off                                                                  
generic-segmentation-offload: off                                                               
generic-receive-offload: off                                                                    
large-receive-offload: off
rx-vlan-offload: off
tx-vlan-offload: off
ntuple-filters: off
receive-hashing: off

I tried turning every setting off, but the ones I can't turn off, I get errors as follows:

bash-4.2# ethtool -K lo rx off
Cannot set device rx csum settings: Operation not supported
bash-4.2# ethtool -K lo tx off
Cannot set device tx csum settings: Operation not supported
bash-4.2# ethtool -K lo sg off
Cannot set device scatter-gather settings: Operation not supported

And the device lo is the local host interface.

How do I fix this so that when I use tcpdump or any other tcp packet tool that I never get checksum errors from utilities that successfully connected to other IP addresses with TCP?

Mike
  • 11
  • 1

0 Answers0