fix(nan): Guard netif calls in NAN_STARTED default event handler

- Commit 08e98f6f30 utilises CONFIG_LWIP_ND6_SUPPORT_STATIC_ENTRIES
  for adding static entries.
- It moves netif calls that generate GOT IPv6 to NAN_STARTED default
  handler without guard, but guards the removal in NDP Confirm handler
- Fix the possible duplicate calls by putting calls from NAN_STARTED
  handler under CONFIG_LWIP_ND6_SUPPORT_STATIC_ENTRIES guard
This commit is contained in:
Nachiket Kukade
2026-07-17 13:51:16 +05:30
committed by Akshat Agrawal
parent 161197138a
commit a8ff7d2ab3
+2
View File
@@ -187,8 +187,10 @@ static void wifi_default_action_nan_started(void *arg, esp_event_base_t base, in
/* Bring the netif up before esp_netif_create_ip6_linklocal() (a no-op unless
* netif_is_up()). esp_netif_up() is private, so use the public action handler;
* NAN is non-DHCP, so it only calls esp_netif_up() and ignores the event args. */
#if CONFIG_LWIP_ND6_SUPPORT_STATIC_ENTRIES
esp_netif_action_connected(s_wifi_netifs[WIFI_IF_NAN], NULL, 0, NULL);
esp_netif_create_ip6_linklocal(s_wifi_netifs[WIFI_IF_NAN]);
#endif
}
}