mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Merge pull request #566 from DrDoof/fix/igmp-off-lookup
igmp: flood all IP multicast again after igmp off
This commit is contained in:
2 files changed
+5
-3
No files matched your search
+2
-1
@@ -73,7 +73,8 @@ uint8_t igmp_packet_handler(void) __banked;
|
|||||||
void igmp_show(void) __banked;
|
void igmp_show(void) __banked;
|
||||||
```c
|
```c
|
||||||
`igmp_setup()` is called at boot-time and configures flooding of all IP-MC packets by
|
`igmp_setup()` is called at boot-time and configures flooding of all IP-MC packets by
|
||||||
default, as otherwise no IP-MC would be possible in the network.
|
default, as otherwise no IP-MC would be possible in the network. `igmp off` calls it as
|
||||||
|
well; groups learned while IGMP was on stay in the table, but are no longer looked up.
|
||||||
|
|
||||||
`igmp_enable()`starts IGMP which cause IGMP packets to be handled by the CPU and forwarding
|
`igmp_enable()`starts IGMP which cause IGMP packets to be handled by the CPU and forwarding
|
||||||
of IP-MC packets to be limited to only subscribed ports.
|
of IP-MC packets to be limited to only subscribed ports.
|
||||||
|
|||||||
+3
-2
@@ -107,8 +107,7 @@ void igmp_setup(void) __banked
|
|||||||
REG_SET(RTL837X_IPV4_UNKN_MC_FLD_PMSK, mask);
|
REG_SET(RTL837X_IPV4_UNKN_MC_FLD_PMSK, mask);
|
||||||
REG_SET(RTL837X_IPV6_UNKN_MC_FLD_PMSK, mask);
|
REG_SET(RTL837X_IPV6_UNKN_MC_FLD_PMSK, mask);
|
||||||
|
|
||||||
// Enable lookup of IPv4 MC addresses in table
|
reg_bit_clear(RTL837X_L2_CTRL, L2_CTRL_LUT_IPMC_HASH);
|
||||||
reg_bit_set(RTL837X_L2_CTRL, L2_CTRL_LUT_IPMC_HASH);
|
|
||||||
|
|
||||||
/* Configure per-port IGMP operations when protocol messages are received
|
/* Configure per-port IGMP operations when protocol messages are received
|
||||||
* bits 0-9 enable MC protocol snooping
|
* bits 0-9 enable MC protocol snooping
|
||||||
@@ -145,6 +144,8 @@ void igmp_enable(void) __banked
|
|||||||
{
|
{
|
||||||
print_string("igmp_enable called\n");
|
print_string("igmp_enable called\n");
|
||||||
igmpEnabled = 1;
|
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
|
// Configure trapping of unhandled IGMP protocol packets to CPU
|
||||||
REG_SET(RTL837X_IGMP_TRAP_CFG, IGMP_CPU_PORT | IGMP_TRAP_PRIORITY);
|
REG_SET(RTL837X_IGMP_TRAP_CFG, IGMP_CPU_PORT | IGMP_TRAP_PRIORITY);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user