From 427e9ac136e0d051309ee207849be8785b9073fa Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Thu, 1 Oct 2026 23:49:02 +0200 Subject: [PATCH] IPv6-only for the Ethernet gateway Split the WiFi part off common/ipv6_only.yaml into common/ipv6_only_eth.yaml and use it on mcu-gateway. The #19750 component list needs ethernet, otherwise the stock component still runs DHCPv4. mdns from the fork also carries the IPv6 fix for ETH-only builds (espressif/esp-protocols#1161). --- common/ipv6_only.yaml | 26 +++----------------------- common/ipv6_only_eth.yaml | 30 ++++++++++++++++++++++++++++++ mcu-gateway.yaml | 1 + 3 files changed, 34 insertions(+), 23 deletions(-) create mode 100644 common/ipv6_only_eth.yaml diff --git a/common/ipv6_only.yaml b/common/ipv6_only.yaml index f2802e0..1fae9fc 100644 --- a/common/ipv6_only.yaml +++ b/common/ipv6_only.yaml @@ -3,32 +3,12 @@ # packages: # common: !include common/common.yaml # ipv6_only: !include common/ipv6_only.yaml -external_components: - # network enable_ipv4 + audio HTTP reader over IPv6 (esphome/esphome#19750), drop once merged - - source: github://pr#19750 - components: [const, network, wifi, audio] +# Ethernet devices use common/ipv6_only_eth.yaml (this without the WiFi part) +packages: + base: !include ipv6_only_eth.yaml wifi: networks: - id: !extend wifi_iot ssid: !secret wifi_ssid_ipv6 password: !secret wifi_password_ipv6 - -esp32: - framework: - components: - # mdns 1.12.0 + fix for "A 0.0.0.0" without IPv4 (espressif/esp-protocols PR pending), drop once released - - name: espressif/mdns - source: https://github.com/randybb/esp-protocols.git - ref: mdns-v1.12.0-zero-ipv4-test - path: components/mdns - # IDF v5.5.5 lwip + .local resolution over IPv6 (espressif/esp-lwip#94), drop once in IDF - - name: lwip - source: https://github.com/randybb/esp-lwip.git - ref: idf-v5.5.5-lwip-component - path: lwip - -network: - enable_ipv6: true - enable_ipv4: false - min_ipv6_addr_count: 1 diff --git a/common/ipv6_only_eth.yaml b/common/ipv6_only_eth.yaml new file mode 100644 index 0000000..1b0e06f --- /dev/null +++ b/common/ipv6_only_eth.yaml @@ -0,0 +1,30 @@ +--- +# IPv6-only IoT network (SLAAC, no DHCPv4) for ethernet devices; add next to a common package: +# packages: +# common_eth: !include common/common_eth.yaml +# ipv6_only: !include common/ipv6_only_eth.yaml +# WiFi devices use common/ipv6_only.yaml (this + the IPv6 SSID) +external_components: + # network enable_ipv4 + audio HTTP reader over IPv6 (esphome/esphome#19750), drop once merged + - source: github://pr#19750 + components: [const, network, wifi, ethernet, audio] + +esp32: + framework: + components: + # mdns 1.12.0 + fix for "A 0.0.0.0" without IPv4 (espressif/esp-protocols#1156, merged) + # + IPv6 on ETH-only builds (espressif/esp-protocols#1161), drop once both are released + - name: espressif/mdns + source: https://github.com/randybb/esp-protocols.git + ref: mdns-v1.12.0-zero-ipv4-test + path: components/mdns + # IDF v5.5.5 lwip + .local resolution over IPv6 (espressif/esp-lwip#94), drop once in IDF + - name: lwip + source: https://github.com/randybb/esp-lwip.git + ref: idf-v5.5.5-lwip-component + path: lwip + +network: + enable_ipv6: true + enable_ipv4: false + min_ipv6_addr_count: 1 diff --git a/mcu-gateway.yaml b/mcu-gateway.yaml index 1ec822b..f51dc9e 100644 --- a/mcu-gateway.yaml +++ b/mcu-gateway.yaml @@ -60,6 +60,7 @@ external_components: packages: # common: !include common/common.yaml common_eth: !include common/common_eth.yaml + ipv6_only: !include common/ipv6_only_eth.yaml i2c: sda: 13