mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
igmp: stop looking up IPv4 multicast in the L2 table on igmp off
igmp_setup(), which `igmp off` also calls, enabled the lookup of IPv4 multicast in the L2 table. Groups learned while IGMP was on therefore kept going only to the ports that had reported them, and with reports no longer trapped nothing updated those entries until a reboot. The lookup is now enabled in igmp_enable() and disabled in igmp_setup(), so with IGMP off all IP multicast is flooded again.
This commit is contained in:
1 parent
e67c928eb7
commit
24c0a95734
2 files changed
+5
-3
No files matched your search
+3
-2
@@ -107,8 +107,7 @@ void igmp_setup(void) __banked
|
||||
REG_SET(RTL837X_IPV4_UNKN_MC_FLD_PMSK, mask);
|
||||
REG_SET(RTL837X_IPV6_UNKN_MC_FLD_PMSK, mask);
|
||||
|
||||
// Enable lookup of IPv4 MC addresses in table
|
||||
reg_bit_set(RTL837X_L2_CTRL, L2_CTRL_LUT_IPMC_HASH);
|
||||
reg_bit_clear(RTL837X_L2_CTRL, L2_CTRL_LUT_IPMC_HASH);
|
||||
|
||||
/* Configure per-port IGMP operations when protocol messages are received
|
||||
* bits 0-9 enable MC protocol snooping
|
||||
@@ -145,6 +144,8 @@ void igmp_enable(void) __banked
|
||||
{
|
||||
print_string("igmp_enable called\n");
|
||||
igmpEnabled = 1;
|
||||
// Enable lookup of IPv4 MC addresses in table
|
||||
reg_bit_set(RTL837X_L2_CTRL, L2_CTRL_LUT_IPMC_HASH);
|
||||
// Configure trapping of unhandled IGMP protocol packets to CPU
|
||||
REG_SET(RTL837X_IGMP_TRAP_CFG, IGMP_CPU_PORT | IGMP_TRAP_PRIORITY);
|
||||
|
||||
|
||||
Reference in new issue
Block a user