mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
Merge branch 'fix/eth-allnodes-multicast-filter_v5.5' into 'release/v5.5'
fix(esp_netif): add all-nodes multicast filter (v5.5) See merge request espressif/esp-idf!52911
This commit is contained in:
@@ -655,6 +655,13 @@ static err_t netif_mld_mac_filter_cb(struct netif *netif, const ip6_addr_t *grou
|
||||
}
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
static void netif_mld_mac_filter_all_nodes(struct netif *netif, enum netif_mac_filter_action action)
|
||||
{
|
||||
ip6_addr_t all_nodes;
|
||||
ip6_addr_set_allnodes_linklocal(&all_nodes);
|
||||
netif_mld_mac_filter_cb(netif, &all_nodes, action);
|
||||
}
|
||||
#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
|
||||
|
||||
static esp_err_t esp_netif_init_configuration(esp_netif_t *esp_netif, const esp_netif_config_t *cfg)
|
||||
@@ -917,7 +924,15 @@ static void esp_netif_lwip_remove(esp_netif_t *esp_netif)
|
||||
if (netif_is_up(esp_netif->lwip_netif)) {
|
||||
netif_set_down(esp_netif->lwip_netif);
|
||||
}
|
||||
#if LWIP_IPV6 && LWIP_IPV6_MLD
|
||||
if (esp_netif->driver_set_mac_filter && esp_netif->lwip_netif->mld_mac_filter) {
|
||||
netif_mld_mac_filter_all_nodes(esp_netif->lwip_netif, NETIF_DEL_MAC_FILTER);
|
||||
}
|
||||
#endif
|
||||
netif_remove(esp_netif->lwip_netif);
|
||||
#if LWIP_IPV6 && LWIP_IPV6_MLD
|
||||
netif_set_mld_mac_filter(esp_netif->lwip_netif, NULL);
|
||||
#endif
|
||||
#if ESP_GRATUITOUS_ARP
|
||||
if (esp_netif->flags & ESP_NETIF_FLAG_GARP) {
|
||||
netif_unset_garp_flag(esp_netif->lwip_netif);
|
||||
@@ -995,6 +1010,8 @@ static esp_err_t esp_netif_lwip_add(esp_netif_t *esp_netif)
|
||||
#endif
|
||||
#if LWIP_IPV6 && LWIP_IPV6_MLD
|
||||
netif_set_mld_mac_filter(esp_netif->lwip_netif, netif_mld_mac_filter_cb);
|
||||
/* ff02::1 is implicitly joined and therefore absent from the MLD group list. */
|
||||
netif_mld_mac_filter_all_nodes(esp_netif->lwip_netif, NETIF_ADD_MAC_FILTER);
|
||||
#endif
|
||||
}
|
||||
lwip_set_esp_netif(esp_netif->lwip_netif, esp_netif);
|
||||
|
||||
@@ -228,12 +228,12 @@ static void ethernet_deinit(test_vfs_eth_network_t *network_hndls)
|
||||
{
|
||||
TEST_ESP_OK(esp_eth_stop(network_hndls->eth_handle));
|
||||
TEST_ESP_OK(esp_eth_del_netif_glue(network_hndls->glue));
|
||||
TEST_ESP_OK(esp_event_handler_unregister(IP_EVENT, IP_EVENT_ETH_GOT_IP, got_ip_event_handler));
|
||||
esp_netif_destroy(network_hndls->eth_netif);
|
||||
esp_eth_driver_uninstall(network_hndls->eth_handle);
|
||||
TEST_ESP_OK(network_hndls->phy->del(network_hndls->phy));
|
||||
TEST_ESP_OK(network_hndls->mac->del(network_hndls->mac));
|
||||
TEST_ESP_OK(esp_event_handler_unregister(IP_EVENT, IP_EVENT_ETH_GOT_IP, got_ip_event_handler));
|
||||
TEST_ESP_OK(esp_event_handler_unregister(ETH_EVENT, ESP_EVENT_ANY_ID, eth_event_handler));
|
||||
esp_netif_destroy(network_hndls->eth_netif);
|
||||
TEST_ESP_OK(esp_event_loop_delete_default());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user