forked from espressif/esp-protocols
		
	examples: common connect code to ignore GOT_IP6_EVENT if comes from unrelated netif
* Original commit: espressif/esp-idf@48fe3a13f5
This commit is contained in:
		
				
					committed by
					
						
						suren-gabrielyan-espressif
					
				
			
			
				
	
			
			
			
						parent
						
							2b7d43e1f8
						
					
				
				
					commit
					07399011f7
				
			@@ -65,8 +65,12 @@ static void on_got_ip(void *arg, esp_event_base_t event_base,
 | 
			
		||||
static void on_got_ipv6(void *arg, esp_event_base_t event_base,
 | 
			
		||||
                        int32_t event_id, void *event_data)
 | 
			
		||||
{
 | 
			
		||||
    ESP_LOGI(TAG, "Got IPv6 event!");
 | 
			
		||||
    ip_event_got_ip6_t *event = (ip_event_got_ip6_t *)event_data;
 | 
			
		||||
    if (event->esp_netif != s_example_esp_netif) {
 | 
			
		||||
        ESP_LOGD(TAG, "Got IPv6 from another netif: ignored");
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    ESP_LOGI(TAG, "Got IPv6 event!");
 | 
			
		||||
    memcpy(&s_ipv6_addr, &event->ip6_info.ip, sizeof(s_ipv6_addr));
 | 
			
		||||
    xEventGroupSetBits(s_connect_event_group, GOT_IPV6_BIT);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user