Modify

Opened 2 years ago

Last modified 2 years ago

#20453 new defect

Multicast IPv6 ICMP packets are dropped by built-in RT5350 switch, breaking neighbour discovery

Reported by: tom@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: IPv6 multicast, Ralink Cc:

Description

The problem I have encountered is basically the exact same thing as described in this previous ticket: /ticket/15448.html except that it is happening in a different platform. In my case, I am using the RT5350F CPU with built in switch. The driver for the switch is the file called <openwrt-root>/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c

I am attaching a one-line-modified version that corrects the problem by configuring one register in the CPU differently. Also, I am attaching a screen capture of the relevant datasheet section. Basically, I have set bits 18 to 24 to zeros to enable IPv6 multicast packets to make it to the CPU.

Here is the section I changed:
The following modification by Tom Rodinger
.reg_initval_fct2 = 0x00d6500c, old value

.reg_initval_fct2 = 0x000e500c, fixed value to allow IPv6 multicasts to get to the CPU

Finally, the attached Wireshark screenshot shows that after the fix, the correct neighbour advertisement response is invoked by a neighbour solicitation message.

I believe that this bug affects a number of variants from Ralink that all use this same switch driver. Hopefully you can integrate this fix into trunk.

Attachments (3)

esw_rt3052.c (39.4 KB) - added by tom@… 2 years ago.
Switch driver with fixed IPv6 multicast handling
Screen Shot 2015-09-05 at 12.25.15 pm.png (244.6 KB) - added by tom@… 2 years ago.
RT5350 datasheet showing register to enable IPv6 multicast
Screen Shot 2015-09-05 at 1.36.41 am.png (194.4 KB) - added by tom@… 2 years ago.
Wireshark capture showing correct neighbour solicitation and advertisement

Download all attachments as: .zip

Change History (5)

Changed 2 years ago by tom@…

Switch driver with fixed IPv6 multicast handling

Changed 2 years ago by tom@…

RT5350 datasheet showing register to enable IPv6 multicast

Changed 2 years ago by tom@…

Wireshark capture showing correct neighbour solicitation and advertisement

comment:1 Changed 2 years ago by jan@…

I can confirm this issue on a D-Link DIR-615 H1 (RT3352F) using the latest Chaos Calmer branch.

Regarding the fix, setting bits 24:18 of FCT2 to zero actually gives a value of 0x0002500c. Similar to how SOCPC is set up in esw_hw_init, it may make sense to exclude the CPU port itself, giving 0x0102500c.

Additionally, the following additional changes would probably be a good idea:

  • Set bits 24:23 of POC2 to 0 in order to broadcast unknown IPv6 multicast packets (this setting is followed if bits 24:18 of FCT2 are set to zero)
  • Set bit 25 of POC2 to 0, so that MLD messages are flooded to all ports

comment:2 Changed 2 years ago by hauke

Please send this as a patch to the mailing list and follow SubmittingPatches.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.