Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#954 - IGMP queries redirected to CPU port when snooping enabled - breaks LAN multicasting #5905

Open
openwrt-bot opened this issue Aug 11, 2017 · 4 comments
Labels

Comments

@openwrt-bot
Copy link

mroek:

The Netgear R7800 has a QCA8337N switch chip, and the CPU has two interfaces (eth0/port 0 and eth1/port 6) connected to the switch. The default in LEDE is that WAN is on port0/eth0, and LAN is on port6/eth1.

When using multicast, it is often desirable to enable IGMP snooping on the switch to avoid flooding the multicast stream to all ports. A multicast server will normally send IGMP general queries to the all hosts address 224.0.0.1 at a regular interval (every few minutes) to check if there are still clients that wants to receive the multicast.

However, when IGMP snooping is enabled on this device, these queries are all //redirected// to port 0 on the switch, which is a problem if the multicast server is within the LAN. In this scenario, the server sends queries, but these queries are not being broadcast to the clients within the LAN, instead they end up at port 0 (eth0) where they are not needed. The server will then receive no responses to the queries, and subsequently times out and stops the stream multicast.

I think I found a viable fix for this, which is to set bit 3 (IGMP_COPY_EN) of the GLOBAL_FW_CTRL0 register in the switch chip to 1. This causes the IGMP queries to be broadcast on all switch ports (provided they are members of the same VLAN), instead of being redirected only to port 0. In my testing, I have found no adverse effects from this change.

I have attached a patch for this change, to make testing easy:

Assuming that the LAN interface is br-lan, run tcpdump on the router and inject IGMP general queries from a computer in the LAN, for example using Ostinato. With IGMP snooping off, the query is seen on br-lan:

root@R7800:/# tcpdump -i br-lan igmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br-lan, link-type EN10MB (Ethernet), capture size 262144 bytes
11:47:06.832511 IP 192.168.20.1 > all-systems.mcast.net: igmp query v2

If IGMP snooping is turned on (globally or for the port where the query is received), then the query no longer appears at br-lan,
but instead only on eth0. Applying the attached patch fixes this.

@openwrt-bot
Copy link
Author

stintel:

Please send patches via the ML, or create a PR on github. See https://lede-project.org/submitting-patches. Make sure to reference this bug in the commit message (Fixes: FS#954)

@mroek
Copy link

mroek commented Aug 3, 2022

So this issue still persists. I guess I could try to create a PR for this, but it would be good if one of the developers could chime in, maybe in particular @nbd168 , since he wrote the ar8327 driver. As mentioned in the original report, there seems to be no adverse effects of this, but I have only tested on the Netgear R7800 myself.

@tapper82
Copy link
Contributor

tapper82 commented Aug 3, 2022

Is this bug still there in RC6?

@mroek
Copy link

mroek commented Aug 3, 2022

Is this bug still there in RC6?

Yes it is. It is a really simple fix, but it requires a dev to look at it and decide whether it should go in or not. I have updated my patch to align with the current version of the relevant files, but the actual changes made are exactly the same (just at different line numbers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants