Hi,
I am seeing packet corruption using a fec(4) on my armv7 machine.
A case that goes wrong is a packet of length 59 (a DNS query asking a
root server for the DS record of the nl. domain). Other queries of
length 59 also go wrong. The strange things is that if I manually do
the same query with dig (this also produces also 59 bytes):
dig @199.9.14.201 nl. ds +dnssec +bufsize=1232
it does get through uncorrupted....
In the first case the packet is sent out with sendto(2) from
pdns_recursor, with dig it is sendmsg(2).
Two packet captures of the case that goes wrong:
Sent out by fec(4) as seen by tcpdump
16:14:46.961423 10.1.1.9.47893 > 199.9.14.201.53: [udp sum ok] 36284
[1au] DS? nl. ar: . OPT UDPsize=1232 DO(31) (ttl 64, id 46567, len 59)
0000: 4500 003b b5e7 0000 4011 e3ee 0a01 0109 E..;....@.......
0010: c709 0ec9 bb15 0035 0027 6d9b 8dbc 0000 .......5.'m.....
0020: 0001 0000 0000 0001 026e 6c00 002b 0001 .........nl..+..
0030: 0000 2904 d000 0080 0000 00 ..)........
Same packet as received on the router with em(4), the incoming
interface:
16:14:46.962582 10.1.1.9.47893 > 199.9.14.201.53: [bad udp cksum 9b6d!
-> 9a81] 36284 [1au] DS? nl. ar: . OPT[|domain] (ttl 64, id 46567, len 59)
0000: 4500 003b b5e7 0000 4011 e3ee 0a01 0109 E..;....@.......
0010: c709 0ec9 bb15 0035 0027 6d9b 8dbc 0000 .......5.'m.....
0020: 0001 0000 0000 0001 026e 6c00 002b 0001 .........nl..+..
0030: 0000 2904 d000 0080 0000 ec ..)........
Note that the last byte differs.
dmesg below
-Otto
OpenBSD 6.6 (GENERIC) #226: Sat Oct 12 08:36:17 MDT 2019
[email protected]:/usr/src/sys/arch/armv7/compile/GENERIC
real mem = 2111655936 (2013MB)
avail mem = 2060648448 (1965MB)
mainbus0 at root: Wandboard i.MX6 Quad Board rev B1
cpu0 at mainbus0 mpidr 0: ARM Cortex-A9 r2p10
cpu0: 32KB 32b/line 4-way L1 VIPT I-cache, 32KB 32b/line 4-way L1 D-cache
cortex0 at mainbus0
amptimer0 at cortex0: tick rate 396000 KHz
armliicc0 at cortex0: rtl 7 waymask: 0x0000000f
imxtemp0 at mainbus0simplebus0 at mainbus0: "soc"
ampintc0 at simplebus0 nirq 160, ncpu 4: "interrupt-controller"
"dma-apbh" at simplebus0 not configured
"hdmi" at simplebus0 not configured
"gpu" at simplebus0 not configured
"gpu" at simplebus0 not configured
"timer" at simplebus0 not configured
"l2-cache" at simplebus0 not configured
simplebus1 at simplebus0: "aips-bus"
imxccm0 at simplebus1
imxanatop0 at simplebus1
syscon0 at simplebus1: "snvs"
imxrtc0 at syscon0
"snvs-lpgpr" at syscon0 not configured
syscon1 at simplebus1: "iomuxc-gpr"
"mux-controller" at syscon1 not configured
"ipu1_csi0_mux" at syscon1 not configured
"ipu2_csi1_mux" at syscon1 not configured
imxiomuxc0 at simplebus1
simplebus2 at simplebus1: "spba-bus"
"spdif" at simplebus2 not configured
imxuart0 at simplebus2: console
"ssi" at simplebus2 not configured
"asrc" at simplebus2 not configured
"vpu" at simplebus1 not configured
"gpt" at simplebus1 not configured
imxgpio0 at simplebus1
imxgpio1 at simplebus1
imxgpio2 at simplebus1
imxgpio3 at simplebus1
imxgpio4 at simplebus1
imxgpio5 at simplebus1
imxgpio6 at simplebus1
imxdog0 at simplebus1
"usbphy" at simplebus1 not configured
"usbphy" at simplebus1 not configured
"src" at simplebus1 not configured
imxgpc0 at simplebus1
"sdma" at simplebus1 not configured
simplebus3 at simplebus0: "aips-bus"
syscon2 at simplebus3: "ocotp"
"caam" at simplebus3 not configured
imxehci0 at simplebus3
usb0 at imxehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "i.MX EHCI root hub" rev 2.00/1.00
addr 1
imxehci1 at simplebus3
usb1 at imxehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "i.MX EHCI root hub" rev 2.00/1.00
addr 1
"usbmisc" at simplebus3 not configured
fec0 at simplebus3
fec0: address 00:1f:7b:b4:06:10
atphy0 at fec0 phy 1: AR8035 10/100/1000 PHY, rev. 4
imxesdhc0 at simplebus3
imxesdhc0: 198 MHz base clock
sdmmc0 at imxesdhc0: 4-bit, sd high-speed, mmc high-speed, dma
imxesdhc1 at simplebus3
imxesdhc1: 198 MHz base clock
sdmmc1 at imxesdhc1: 4-bit, sd high-speed, mmc high-speed, dma
imxesdhc2 at simplebus3
imxesdhc2: 198 MHz base clock
sdmmc2 at imxesdhc2: 4-bit, sd high-speed, mmc high-speed, dma
imxiic0 at simplebus3
iic0 at imxiic0
imxiic1 at simplebus3
iic1 at imxiic1
"fsl,sgtl5000" at iic1 addr 0xa not configured
"mmdc" at simplebus3 not configured
"audmux" at simplebus3 not configured
"vdoa" at simplebus3 not configured
imxuart1 at simplebus3
"ipu" at simplebus0 not configured
"sram" at simplebus0 not configured
imxahci0 at simplebus0: AHCI 1.3
imxahci0: port 0: 3.0Gb/s
scsibus0 at imxahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: <ATA, KINGSTON SV300S3, 608A> naa.50026b736503c6f1
sd0: 114473MB, 512 bytes/sector, 234441648 sectors, thin
"gpu" at simplebus0 not configured
"ipu" at simplebus0 not configured
scsibus1 at sdmmc2: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <SD/MMC, SU16G, 0080> removable
sd1: 15193MB, 512 bytes/sector, 31116288 sectors
bwfm0 at sdmmc1 function 1
bwfm0: SoC interconnect SB not implemented
bwfm0: cannot attach chip
manufacturer 0x02d0, product 0x4329 at sdmmc1 function 2 not configured
manufacturer 0x02d0, product 0x4329 at sdmmc1 function 3 not configured
axen0 at uhub1 port 1 configuration 1 interface 0 "Sitecom Europe BV Sitecom
USB 3.0 Gigabit" rev 2.10/1.00 addr 2
axen0: AX88179, address 00:0c:f6:ff:e0:3b
rgephy0 at axen0 phy 3: RTL8169S/8110S/8211 PHY, rev. 5
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd1a (d1e4f9a54e2211c2.a) swap on sd1b dump on sd1b