mirror of
https://github.com/esphome/esphome.git
synced 2024-11-12 10:16:02 +01:00
[wireguard] Implement workaround for crash on IDF 5+ (#6846)
This commit is contained in:
parent
cdf83c5d8c
commit
2d56d8d84f
@ -7,7 +7,10 @@ from esphome.const import (
|
||||
CONF_TIME_ID,
|
||||
CONF_ADDRESS,
|
||||
CONF_REBOOT_TIMEOUT,
|
||||
KEY_CORE,
|
||||
KEY_FRAMEWORK_VERSION,
|
||||
)
|
||||
from esphome.components.esp32 import CORE, add_idf_sdkconfig_option
|
||||
from esphome.components import time
|
||||
from esphome.core import TimePeriod
|
||||
from esphome import automation
|
||||
@ -117,6 +120,13 @@ async def to_code(config):
|
||||
if config[CONF_REQUIRE_CONNECTION_TO_PROCEED]:
|
||||
cg.add(var.disable_auto_proceed())
|
||||
|
||||
# Workaround for crash on IDF 5+
|
||||
# See https://github.com/trombik/esp_wireguard/issues/33#issuecomment-1568503651
|
||||
if CORE.using_esp_idf and CORE.data[KEY_CORE][KEY_FRAMEWORK_VERSION] >= cv.Version(
|
||||
5, 0, 0
|
||||
):
|
||||
add_idf_sdkconfig_option("CONFIG_LWIP_PPP_SUPPORT", True)
|
||||
|
||||
# This flag is added here because the esp_wireguard library statically
|
||||
# set the size of its allowed_ips list at compile time using this value;
|
||||
# the '+1' modifier is relative to the device's own address that will
|
||||
|
Loading…
Reference in New Issue
Block a user