Bad Checksum on i386-current

2012-02-11 Thread Insan Praja SW

Hi Misc@,

Could someone elaborate me with this tcpdump I had? After nat-ing,  
checksum error shows, on the same packet..


rule 173.home.8/(match) [uid 0, pid 9731] pass in on vlan516:  
172.16.33.254.64264  188.255.110.14.51413: S [tcp sum ok]  
260322197:260322197(0) win 8192 mss 1436,nop,nop,sackOK [tos 0x28] (ttl  
126, id 5689, len 48)
rule 173.home.13/(match) [uid 0, pid 9731] pass out on vlan500: [orig src  
172.16.33.254:64264, dst 188.255.110.14:51413] 202.90.195.234.59074   
188.255.110.14.51413: S [bad tcp cksum f54!] 260322197:260322197(0) win  
8192 mss 1436,nop,nop,sackOK [tos 0x28] (ttl 125, id 5689, len 48, bad  
cksum 2d4b!)


Thanks,

Insan Praja

dmesg:
OpenBSD 5.1 (GENERIC.MP) #15: Fri Feb 10 01:01:43 WIT 2012
r...@core01.netaplus.net:/usr/src/sys/arch/i386/compile/GENERIC.MP
RTC BIOS diagnostic error 80clock_battery
cpu0: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz (GenuineIntel 686-class) 2.40  
GHz
cpu0:  
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,LONG,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,LAHF

real mem  = 2135588864 (2036MB)
avail mem = 2090528768 (1993MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 07/23/10, BIOS32 rev. 0 @ 0xfd7e1,  
SMBIOS rev. 2.5 @ 0x7f6b9000 (55 entries)

bios0: vendor IBM Corp. version -[GYE144AUS-1.09]- date 12/16/2010
bios0: IBM 81Y6793
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S5
acpi0: tables DSDT FACP TCPA APIC MCFG SLIC HPET SSDT SSDT ERST DMAR
acpi0: wakeup devices PCIB(S4) POP3(S4) POP1(S4) POP6(S4) POP5(S4)  
PEX1(S4) PEX2(S4) PEX3(S4) PEX4(S4) PEX5(S4) EHI1(S3) EHI2(S3) PWRB(S3)

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 132MHz
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz (GenuineIntel 686-class) 2.40  
GHz
cpu1:  
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,LONG,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,LAHF

cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz (GenuineIntel 686-class) 2.40  
GHz
cpu2:  
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,LONG,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,LAHF

cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz (GenuineIntel 686-class) 2.40  
GHz
cpu3:  
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,LONG,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,LAHF

ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0x8000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 36 (PCIB)
acpiprt2 at acpi0: bus 26 (POP3)
acpiprt3 at acpi0: bus -1 (POP1)
acpiprt4 at acpi0: bus -1 (POP6)
acpiprt5 at acpi0: bus 31 (POP5)
acpiprt6 at acpi0: bus 1 (PEX1)
acpiprt7 at acpi0: bus 6 (PEX2)
acpiprt8 at acpi0: bus 11 (PEX3)
acpiprt9 at acpi0: bus 16 (PEX4)
acpiprt10 at acpi0: bus 21 (PEX5)
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
acpicpu2 at acpi0: PSS
acpicpu3 at acpi0: PSS
acpibtn0 at acpi0: PWRB
bios0: ROM list: 0xc/0x8000 0xc8000/0x1000 0xc9000/0x1000  
0xca000/0x1000

ipmi at mainbus0 not configured
cpu0: Enhanced SpeedStep 2394 MHz: speeds: 2394, 2261, 2128, 1995, 1862,  
1729, 1596, 1463, 1330, 1197 MHz

pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel Core DMI rev 0x11
ppb0 at pci0 dev 3 function 0 Intel Core PCIE rev 0x11: apic 8 int 16
pci1 at ppb0 bus 26
ppb1 at pci0 dev 5 function 0 Intel Core PCIE rev 0x11: apic 8 int 16
pci2 at ppb1 bus 31
em0 at pci2 dev 0 function 0 Intel I340-T2 (82580) rev 0x01: msi,  
address 00:1b:21:90:00:d0
em1 at pci2 dev 0 function 1 Intel I340-T2 (82580) rev 0x01: msi,  
address 00:1b:21:90:00:d1

Intel Core Management rev 0x11 at pci0 dev 8 function 0 not configured
Intel Core Scratch rev 0x11 at pci0 dev 8 function 1 not configured
Intel Core Control rev 0x11 at pci0 dev 8 function 2 not configured
Intel Core Misc rev 0x11 at pci0 dev 8 function 3 not configured
Intel Core QPI Link rev 0x11 at pci0 dev 16 function 0 not configured
Intel Core QPI Routing rev 0x11 at pci0 dev 16 function 1 not configured
ehci0 at pci0 dev 26 function 0 Intel 3400 USB rev 0x05: apic 8 int 19
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb2 at pci0 dev 28 function 0 Intel 3400 PCIE rev 0x05: apic 8 int 17
pci3 at ppb2 bus 1
ppb3 at pci0 dev 28 function 4 Intel 3400 PCIE rev 0x05: apic 8 int 17
pci4 at ppb3 bus 6
ppb4 at pci4 dev 0 

Re: Bad Checksum on i386-current

2012-02-11 Thread Tomas Bodzar
On Sat, Feb 11, 2012 at 12:43 PM, Insan Praja SW insan.pr...@gmail.com
wrote:
 Hi Misc@,

 Could someone elaborate me with this tcpdump I had? After nat-ing, checksum
 error shows, on the same packet..

 rule 173.home.8/(match) [uid 0, pid 9731] pass in on vlan516:
 172.16.33.254.64264  188.255.110.14.51413: S [tcp sum ok]
 260322197:260322197(0) win 8192 mss 1436,nop,nop,sackOK [tos 0x28] (ttl
 126, id 5689, len 48)
 rule 173.home.13/(match) [uid 0, pid 9731] pass out on vlan500: [orig src
 172.16.33.254:64264, dst 188.255.110.14:51413] 202.90.195.234.59074 
 188.255.110.14.51413: S [bad tcp cksum f54!] 260322197:260322197(0) win
8192
 mss 1436,nop,nop,sackOK [tos 0x28] (ttl 125, id 5689, len 48, bad cksum
 2d4b!)

from man tcpdump

 IP Checksum Offload
 Some network cards support IP checksum offload.  Packet headers for such
 interfaces erroneously indicate a bad checksum, since the checksum is
not
 calculated until after tcpdump sees the packet.

so maybe related to your case

 Thanks,

 Insan Praja

 dmesg:
 OpenBSD 5.1 (GENERIC.MP) #15: Fri Feb 10 01:01:43 WIT 2012
 B  B r...@core01.netaplus.net:/usr/src/sys/arch/i386/compile/GENERIC.MP
 RTC BIOS diagnostic error 80clock_battery
 cpu0: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz (GenuineIntel 686-class) 2.40
 GHz
 cpu0:

FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,LONG,SSE3,MWAIT,DS-CPL,VMX,SMX,
EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,LAHF
 real mem B = 2135588864 (2036MB)
 avail mem = 2090528768 (1993MB)
 mainbus0 at root
 bios0 at mainbus0: AT/286+ BIOS, date 07/23/10, BIOS32 rev. 0 @ 0xfd7e1,
 SMBIOS rev. 2.5 @ 0x7f6b9000 (55 entries)
 bios0: vendor IBM Corp. version -[GYE144AUS-1.09]- date 12/16/2010
 bios0: IBM 81Y6793
 acpi0 at bios0: rev 2
 acpi0: sleep states S0 S1 S5
 acpi0: tables DSDT FACP TCPA APIC MCFG SLIC HPET SSDT SSDT ERST DMAR
 acpi0: wakeup devices PCIB(S4) POP3(S4) POP1(S4) POP6(S4) POP5(S4) PEX1(S4)
 PEX2(S4) PEX3(S4) PEX4(S4) PEX5(S4) EHI1(S3) EHI2(S3) PWRB(S3)
 acpitimer0 at acpi0: 3579545 Hz, 24 bits
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 cpu0 at mainbus0: apid 0 (boot processor)
 cpu0: apic clock running at 132MHz
 cpu1 at mainbus0: apid 2 (application processor)
 cpu1: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz (GenuineIntel 686-class) 2.40
 GHz
 cpu1:

FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,LONG,SSE3,MWAIT,DS-CPL,VMX,SMX,
EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,LAHF
 cpu2 at mainbus0: apid 4 (application processor)
 cpu2: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz (GenuineIntel 686-class) 2.40
 GHz
 cpu2:

FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,LONG,SSE3,MWAIT,DS-CPL,VMX,SMX,
EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,LAHF
 cpu3 at mainbus0: apid 6 (application processor)
 cpu3: Intel(R) Xeon(R) CPU X3430 @ 2.40GHz (GenuineIntel 686-class) 2.40
 GHz
 cpu3:

FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,NXE,LONG,SSE3,MWAIT,DS-CPL,VMX,SMX,
EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,LAHF
 ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
 acpimcfg0 at acpi0 addr 0x8000, bus 0-255
 acpihpet0 at acpi0: 14318179 Hz
 acpiprt0 at acpi0: bus 0 (PCI0)
 acpiprt1 at acpi0: bus 36 (PCIB)
 acpiprt2 at acpi0: bus 26 (POP3)
 acpiprt3 at acpi0: bus -1 (POP1)
 acpiprt4 at acpi0: bus -1 (POP6)
 acpiprt5 at acpi0: bus 31 (POP5)
 acpiprt6 at acpi0: bus 1 (PEX1)
 acpiprt7 at acpi0: bus 6 (PEX2)
 acpiprt8 at acpi0: bus 11 (PEX3)
 acpiprt9 at acpi0: bus 16 (PEX4)
 acpiprt10 at acpi0: bus 21 (PEX5)
 acpicpu0 at acpi0: PSS
 acpicpu1 at acpi0: PSS
 acpicpu2 at acpi0: PSS
 acpicpu3 at acpi0: PSS
 acpibtn0 at acpi0: PWRB
 bios0: ROM list: 0xc/0x8000 0xc8000/0x1000 0xc9000/0x1000
0xca000/0x1000
 ipmi at mainbus0 not configured
 cpu0: Enhanced SpeedStep 2394 MHz: speeds: 2394, 2261, 2128, 1995, 1862,
 1729, 1596, 1463, 1330, 1197 MHz
 pci0 at mainbus0 bus 0: configuration mode 1 (bios)
 pchb0 at pci0 dev 0 function 0 Intel Core DMI rev 0x11
 ppb0 at pci0 dev 3 function 0 Intel Core PCIE rev 0x11: apic 8 int 16
 pci1 at ppb0 bus 26
 ppb1 at pci0 dev 5 function 0 Intel Core PCIE rev 0x11: apic 8 int 16
 pci2 at ppb1 bus 31
 em0 at pci2 dev 0 function 0 Intel I340-T2 (82580) rev 0x01: msi, address
 00:1b:21:90:00:d0
 em1 at pci2 dev 0 function 1 Intel I340-T2 (82580) rev 0x01: msi, address
 00:1b:21:90:00:d1
 Intel Core Management rev 0x11 at pci0 dev 8 function 0 not configured
 Intel Core Scratch rev 0x11 at pci0 dev 8 function 1 not configured
 Intel Core Control rev 0x11 at pci0 dev 8 function 2 not configured
 Intel Core Misc rev 0x11 at pci0 dev 8 function 3 not configured
 Intel Core QPI Link rev 0x11 at pci0 dev 16 function 0 not configured
 Intel Core QPI Routing rev 0x11 

Re: Bad Checksum on i386-current

2012-02-11 Thread Christiano F. Haesbaert
On 11 February 2012 11:00, Tomas Bodzar tomas.bod...@gmail.com wrote:
 On Sat, Feb 11, 2012 at 12:43 PM, Insan Praja SW insan.pr...@gmail.com
 wrote:
 Hi Misc@,

 Could someone elaborate me with this tcpdump I had? After nat-ing,
checksum
 error shows, on the same packet..

 rule 173.home.8/(match) [uid 0, pid 9731] pass in on vlan516:
 172.16.33.254.64264  188.255.110.14.51413: S [tcp sum ok]
 260322197:260322197(0) win 8192 mss 1436,nop,nop,sackOK [tos 0x28] (ttl
 126, id 5689, len 48)
 rule 173.home.13/(match) [uid 0, pid 9731] pass out on vlan500: [orig src
 172.16.33.254:64264, dst 188.255.110.14:51413] 202.90.195.234.59074 
 188.255.110.14.51413: S [bad tcp cksum f54!] 260322197:260322197(0) win
 8192
 mss 1436,nop,nop,sackOK [tos 0x28] (ttl 125, id 5689, len 48, bad cksum
 2d4b!)

 from man tcpdump

  IP Checksum Offload
 Some network cards support IP checksum offload.  Packet headers for
such
 interfaces erroneously indicate a bad checksum, since the checksum is
 not
 calculated until after tcpdump sees the packet.

 so maybe related to your case


I think that is not the case here, by default we do not enable em(4)
checksumming offload.

Just to make sure, can you give me the output of 'if config
em{0,1,2,3} hwfeatures' ?

I think pf is not recalculating the checksum after nating, not sure if
it should, henning ?



Re: Bad Checksum on i386-current

2012-02-11 Thread Christiano F. Haesbaert
On 11 February 2012 09:43, Insan Praja SW insan.pr...@gmail.com wrote:
 Hi Misc@,

 Could someone elaborate me with this tcpdump I had? After nat-ing, checksum
 error shows, on the same packet..

 rule 173.home.8/(match) [uid 0, pid 9731] pass in on vlan516:
 172.16.33.254.64264  188.255.110.14.51413: S [tcp sum ok]
 260322197:260322197(0) win 8192 mss 1436,nop,nop,sackOK [tos 0x28] (ttl
 126, id 5689, len 48)
 rule 173.home.13/(match) [uid 0, pid 9731] pass out on vlan500: [orig src
 172.16.33.254:64264, dst 188.255.110.14:51413] 202.90.195.234.59074 
 188.255.110.14.51413: S [bad tcp cksum f54!] 260322197:260322197(0) win 8192
 mss 1436,nop,nop,sackOK [tos 0x28] (ttl 125, id 5689, len 48, bad cksum
 2d4b!)


Obvious question I missed, do they reach the other host with wrong checksums ?



Re: Bad Checksum on i386-current

2012-02-11 Thread Henning Brauer
* Christiano F. Haesbaert haesba...@haesbaert.org [2012-02-11 14:25]:
 I think pf is not recalculating the checksum after nating, not sure if
 it should, henning ?

ip_output does that unconditionally, and i fixed the bridge to do that too

-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/