Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
Tentative change: #if 0-out the functions that set the IP and DNS add…
Browse files Browse the repository at this point in the history
…resses within EP-IDF. ESP-IDF determines these for itself during PPP negotiation.
  • Loading branch information
RobMeades committed Sep 22, 2024
1 parent 9b760f6 commit 6fb866b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions port/platform/esp-idf/src/u_port_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ static int32_t convertIpAddress(uSockIpAddress_t *pIn, esp_ip_addr_t *pOut)
return espError;
}

#if 0
// Switch off DHCP and tell the IP stack what our IP address is.
static esp_err_t setIpAddress(esp_netif_t *pEspNetif, uSockIpAddress_t *pIpAddress)
{
Expand Down Expand Up @@ -249,6 +250,7 @@ static esp_err_t setDnsAddress(esp_netif_t *pEspNetif, esp_netif_dns_type_t type

return espError;
}
#endif

// This function is provided as a callback to the NETIF layer of
// ESP-IDF in the structure esp_netif_driver_ifconfig_t, see
Expand Down Expand Up @@ -323,6 +325,7 @@ static esp_err_t postAttachStart(esp_netif_t *pEspNetif, void *pArgs)
}
}

#if 0
if ((espError == ESP_OK) && (pDriver->pIpAddress != NULL)) {
espError = setIpAddress(pEspNetif, pDriver->pIpAddress);
pDriver->pIpAddress = NULL; // NULL'ed so that we don't think it can be used again
Expand All @@ -340,6 +343,7 @@ static esp_err_t postAttachStart(esp_netif_t *pEspNetif, void *pArgs)
}
}
// Note: secondary DNS address not supported by ESP-IDF for PPP
#endif

#if defined(CONFIG_LWIP_PPP_PAP_SUPPORT) || defined(CONFIG_LWIP_PPP_CHAP_SUPPORT)
if (espError == ESP_OK) {
Expand Down Expand Up @@ -688,7 +692,12 @@ int32_t uPortPppReconnect(void *pDevHandle,
if (pPppInterface != NULL) {
errorCode = (int32_t) U_ERROR_COMMON_PLATFORM;
pEspNetif = pPppInterface->netifDriver.base.netif;
#if 0
(void) pIpAddress;
if (pEspNetif != NULL) {
#else
if ((pEspNetif != NULL) && (setIpAddress(pEspNetif, pIpAddress) == ESP_OK)) {
#endif
errorCode = (int32_t) U_ERROR_COMMON_SUCCESS;
// Perform a disconnect and then connect again
if (pPppInterface->pDisconnectCallback != NULL) {
Expand Down

0 comments on commit 6fb866b

Please sign in to comment.