Skip to content

Commit

Permalink
fix(ppp): Only call peer DNS function if configured
Browse files Browse the repository at this point in the history
The ppp_set_usepeerdns macro is only defined if both flags are enabled, so
breaks compilation trying to call it if not. Fix is to add the same flags
around the call, so the code now compiles.
  • Loading branch information
sgryphon committed Feb 24, 2024
1 parent bf58e6c commit 495183a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/esp_netif/lwip/esp_netif_lwip_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ netif_related_data_t * esp_netif_new_ppp(esp_netif_t *esp_netif, const esp_netif
#if PPP_NOTIFY_PHASE
ppp_set_notify_phase_callback(ppp_obj->ppp, on_ppp_notify_phase);
#endif
#if PPP_IPV4_SUPPORT
#if LWIP_DNS
ppp_set_usepeerdns(ppp_obj->ppp, 1);
#endif /* LWIP_DNS */
#endif /* PPP_IPV4_SUPPORT */

return (netif_related_data_t *)ppp_obj;
}
Expand Down

0 comments on commit 495183a

Please sign in to comment.