greearb / ath10k-ct

Stand-alone ath10k driver based on Candela Technologies Linux kernel.
111 stars 41 forks source link

Problems with received vlan tagged frames #216

Closed nightcore500 closed 6 months ago

nightcore500 commented 1 year ago

I am currently running OpenWRT 22.03.5 with kernel version 5.10.176 on a Ubiquiti NanoBeam AC Gen2 (WA) (Atheros AR9342 rev 3). I use the packages ath10k-firmware-qca988x-ct-full-htt and kmod-ath10k-ct-smallbuffers. I am currently using firmware 10.1-ct-8x-__fH-022-ecad3248.

The device is connected to a LANCOM access point as a WLAN client. Unfortunately there are currently problems if a VLAN tag is used.

In this example I have configured my device to try to get an IP from my DHCP server which is located behind my access point via interface wlan0 and wlan0.301. So I use additionally VLAN 301. Over wlan0 this works without problems. But with the interface wlan0.301 the following scenario occurs:

The tagged request is transmitted to the access point without problems and is also answered correctly by the DHCP server. The tagged frame containing the response arrives at the access point and is transmitted to the device. However, the DHCP client service of the device does not receive the response. The RX counter of the wlan0.301 interface increases with each response of the DHCP server. But also the RX dropped counter. When I did a tcpdump on wlan0.301, I noticed that "aa aa 03 00 00 00" was added between the source mac field and the type field of the response frame, most likely causing the frame to be dropped.

Here is the frame in question:

0000   ac 8b a9 c0 e5 8d 00 a0 57 14 86 52 aa aa 03 00
0010   00 00 08 00 45 00 01 4b 13 0e 00 00 3c 11 0c 30
0020   ac 14 00 01 ac 14 06 3b 00 43 00 44 01 37 f5 44
0030   02 01 06 00 3b ef 51 c9 01 00 00 00 00 00 00 00
0040   ac 14 06 3b 00 00 00 00 00 00 00 00 ac 8b a9 c0
0050   e5 8d 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0080   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0090   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00a0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00b0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00c0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00d0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00e0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00f0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0100   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0110   00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63
0120   35 01 02 36 04 ac 14 00 01 01 04 ff ff f0 00 03
0130   04 ac 14 00 01 06 04 ac 14 00 01 0f 15 76 6c 61
0140   6e 33 30 31 2e 61 63 63 65 73 73 2d 69 6e 74 2e
0150   64 65 1c 04 ac 14 0f ff 33 04 00 00 8c a0 ff

Looks like 802.2 LLC header along with SNAP? What could be the cause of this?

nightcore500 commented 1 year ago

I have just looked at the raw frame via HTT-DUMP debug level. There is the LLC header before and after the type field and the VLAN ID field (81 00 01 2d). So it is duplicated. I am unsure if this is correct at all:

00000000: 88 42 30 00 ac 8b a9 c0 e5 8d 02 a0 57 37 fc 01  .B0.........W7..
00000010: 00 a0 57 14 86 52 a0 3c 00 00 18 04 00 20 00 00  ..W..R.<..... ..
00000020: 00 00 aa aa 03 00 00 00 81 00 01 2d aa aa 03 00  ...........-....
00000030: 00 00 08 00 45 00 01 4b cb 9d 00 00 3c 11 53 a0  ....E..K....<.S.
00000040: ac 14 00 01 ac 14 06 3b 00 43 00 44 01 37 fd d0  .......;.C.D.7..
00000050: 02 01 06 00 14 93 66 36 0b 63 00 00 00 00 00 00  ......f6.c......
00000060: ac 14 06 3b 00 00 00 00 00 00 00 00 ac 8b a9 c0  ...;............
00000070: e5 8d 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000130: 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63  ............c.Sc
00000140: 35 01 02 36 04 ac 14 00 01 01 04 ff ff f0 00 03  5..6............
00000150: 04 ac 14 00 01 06 04 ac 14 00 01 0f 15 76 6c 61  .............vla
00000160: 6e 33 30 31 2e 61 63 63 65 73 73 2d 69 6e 74 2e  n301.access-int.
00000170: 64 65 1c 04 ac 14 0f ff 33 04 00 00 8c a0 ff     de......3......