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

When I tried to use igmpv3, I found that the upstream port of the router lost its filtering ability. #6

Open
ZhouYaoLong123 opened this issue Jul 21, 2022 · 0 comments

Comments

@ZhouYaoLong123
Copy link

Hello, author. I am trying to use your code to run on a router. When I tried to use igmpv3, I found that the upstream port of the router lost its filtering ability.
My test environment is like this: the WAN port of the router is used as the upstream interface, and the LAN port is used as the downstream interface. The WAN ports of computer 1 and router are respectively connected to the two LAN ports of the same switch. This computer acts as a multicast source to send UDP datagrams. The other computer 2 is connected to the LAN port of the router as a member of the multicast group.
I use the (igmp_mode_is_include) mode. I call the function (k_joinleave) correctly in the program. In the function, (setsockopt) is called in the (ip_add_source_membership) mode.
If the originaddr specified by computer 2 is 192.168.1.25 and the group is 232.2.3.4, it will only accept UDP datagrams sent from 192.168.1.25. But the actual situation is that as long as the IP address of computer 1 is in the same network segment as the upstream interface of the router, when computer 1 sends a datagram to 232.2.3.4, igmpproxy will receive a message in the kernel and create a multicast route. Then computer 2 received these datagrams, and the filtering failed.
I am lack of knowledge in computer and network. When will the correct filtering be carried out?
I guess that after UDP multicast datagrams are sent to the upstream interface, the kernel will retrieve the datagrams according to the previous filtering settings of igmpproxy.
If the conditions for forwarding are met
The kernel will send a message to igmpproxy, and then igmpproxy, as I said above, receives the message sent by the kernel to create a multicast route and realize forwarding.
If the forwarding conditions are not met
Will the kernel discard this message? (confused)

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

No branches or pull requests

1 participant