improxy icon indicating copy to clipboard operation
improxy copied to clipboard

imp_get_mfcc_ttls() and iface index

Open ghost opened this issue 7 years ago • 0 comments

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.

ghost avatar Jul 02 '18 08:07 ghost