haibbo / improxy Goto Github PK
View Code? Open in Web Editor NEWIGMP/MLD Proxy which supports IGMPv3 and MLDv2 completely
IGMP/MLD Proxy which supports IGMPv3 and MLDv2 completely
I have some troubles with this commit.
I tested improxy five months ago and reverted this commit because I don't need to forward packets from one downstream to other interfaces. After that my router started to forward IPv6 multicast from wan to lan correctly.
I decided to check it again.
In this commit you disabled k_mcast_msfilter.
As a result, Linux Kernel sends MLD2 reports (leaves) with incorect record type.
Attachment contains additional information:
2018-07-02 13:06:00.058 INFO(wan): Expecting MLDv2 record type CHANGE_TO_INCLUDE_MODE for group ff0e::1, but found CHANGE_TO_EXCLUDE_MODE
Hi,
I need to forward IGMPv3 messages from enp0s8 to enp0s9, my .conf is this:
igmp enable version 3
mld enable
upstream enp0s8
downstream enp0s9
But I get the following error:
DEBUG[main@580]: logLevel = 5
DEBUG[load_config@76]: buffer = igmp enable version 3
DEBUG[load_config@94]: token is igmp
DEBUG[load_config@76]: buffer = mld enable
DEBUG[load_config@94]: token is mld
DEBUG[load_config@76]: buffer = upstream enp0s8
DEBUG[load_config@94]: token is upstream
DEBUG[load_config@185]: upstream interface is enp0s8
DEBUG[load_config@76]: buffer = downstream enp0s9
DEBUG[load_config@94]: token is downstream
DEBUG[load_config@194]: downstream interface is enp0s9
DEBUG[init_interface@189]: enp0s9's ipv6 address is fe80::a00:27ff:feff:4040
DEBUG[init_interface@195]: if_index = 4
DEBUG[init_interface@208]: if_mtu = 1500
DEBUG[init_interface@214]: if_falgs = 4163
DEBUG[init_interface@189]: enp0s8's ipv6 address is fe80::a00:27ff:fe89:fa25
DEBUG[init_interface@195]: if_index = 3
DEBUG[init_interface@208]: if_mtu = 1500
DEBUG[init_interface@214]: if_falgs = 4163
DEBUG[init_interface@178]: enp0s9's ipv4 address is 192.168.2.2
DEBUG[init_interface@195]: if_index = 4
DEBUG[init_interface@208]: if_mtu = 1500
DEBUG[init_interface@214]: if_falgs = 4163
DEBUG[init_interface@178]: enp0s8's ipv4 address is 192.168.1.1
DEBUG[init_interface@195]: if_index = 3
DEBUG[init_interface@208]: if_mtu = 1500
DEBUG[init_interface@214]: if_falgs = 4163
ERROR[init_mproxy4@332]: can't create igmp socket
ERROR[main@619]: exiting.........
Do you have an idea why igmp socket can be created?
Running on Ubuntu VM:
description: Computer
width: 64 bits
capabilities: vsyscall32
*-core
description: Motherboard
physical id: 0
*-memory
description: System memory
physical id: 0
size: 16GiB
*-cpu
product: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
vendor: Intel Corp.
physical id: 1
bus info: cpu@0
width: 64 bits
Thanks
First of all, thanks you a lot for this package.
It does help me solve the problem. The only one workable for IGMP/MLD proxy I can find.
Thank You.
I try this software on a ARM little endian and got some warning message as title.
I fix it and attach the changes. Hope this help someone.
} else if(p_pia->ss.ss_family == AF_INET) {
if (!IN_MULTICAST(ntohl(p_pia->v4.sin_addr.s_addr))) {
IMP_LOG_ERROR("group address %s isn't multicast adddress\n",
imp_pi_ntoa(p_pia));
return -1;
}
/*
* Address Range Size Designation
* ------------- ---- -----------
* 224.0.0.0 - 224.0.0.255 (/24) Local Network Control Block
*
* Addresses in the Local Network Control Block are used for protocol
* control traffic that is not forwarded off link.
* [RFC 5771 section 4]
*/
Hello and thank you for this igmp/mld proxy code
I run some static code analysis on it and I would like to share somes results with you
I hope it help
Best Reagrds
Function imp_get_mfcc_ttls() checks that
p_if->if_index < length
where length is MAXVIFS (32 for linux).
But interface index may be greater than this value.
SOHO routers may have 40 interfaces (e.g. Realtek-based routers with real and virtual wifi interfaces, wds etc). As a result, eth1 (wan) and br0 (lan) have indexes greater than 32 and improxy doesn't call
imp_membership_db_mfc_add() because imp_get_mfcc_ttls returns 0.
I don't quite understand this limitation. I removed it for my device. But as a generic solution, maybe you should check the number of interfaces for which you call k_add_ip6_mif or k_add_ip4_vif.
Dear author:
I would like to report a problem (bug).
at source_timer_handler() in data.c, the code segment could have crash risk.
The imp_group_cleanup(p_gp) will free (p_gp) at end of that function.
After return, the last line "imp_membership_db_update(&p_gp->group_addr);"
if(p_gp->type == GROUP_INCLUDE && imp_source_exist_allow(p_gp) == 0){
/* If there are no more source records for the group, delete group record.
* rfc 3376 [6.3]
*/
imp_group_cleanup(p_gp);
}
imp_membership_db_update(&p_gp->group_addr);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.