mirror of
https://github.com/esphome/esphome.git
synced 2024-12-31 18:01:45 +01:00
[wireguard] Implement workaround for crash on IDF 5+ (#6846)
This commit is contained in:
parent
cdf83c5d8c
commit
2d56d8d84f
1 changed files with 10 additions and 0 deletions
|
@ -7,7 +7,10 @@ from esphome.const import (
|
||||||
CONF_TIME_ID,
|
CONF_TIME_ID,
|
||||||
CONF_ADDRESS,
|
CONF_ADDRESS,
|
||||||
CONF_REBOOT_TIMEOUT,
|
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.components import time
|
||||||
from esphome.core import TimePeriod
|
from esphome.core import TimePeriod
|
||||||
from esphome import automation
|
from esphome import automation
|
||||||
|
@ -117,6 +120,13 @@ async def to_code(config):
|
||||||
if config[CONF_REQUIRE_CONNECTION_TO_PROCEED]:
|
if config[CONF_REQUIRE_CONNECTION_TO_PROCEED]:
|
||||||
cg.add(var.disable_auto_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
|
# 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;
|
# 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
|
# the '+1' modifier is relative to the device's own address that will
|
||||||
|
|
Loading…
Reference in a new issue