security/fix: Final review corrections for Ethernet runtime config

Security fixes:
- IP validation: bounds checking for octets (0-255)
- ETH.config() return value now checked with distinct logging
- set ip 0.0.0.0 now enables DHCP (was rejected before)

Documentation:
- Fixed typo: 'thevalue' → 'the value'
- Added missing: advert.zerohop command documentation
- Clarified IP configuration behavior (DHCP, ETH_STATIC_IP fallback, reset to DHCP)

All identified issues addressed or documented as out-of-scope.
PR #2260 ready for maintainer review.
This commit is contained in:
Piero Andreini 2026-04-06 22:30:52 +02:00
parent ce1b760b29
commit b1d7edc1e7
11 changed files with 55 additions and 46 deletions

View file

@ -30,8 +30,6 @@ lib_deps =
stevemarple/MicroNMEA @ ^2.0.6
adafruit/Adafruit BME280 Library @ ^2.3.0
; === LilyGo T-ETH-Elite with SX1262 environments ===
[env:LilyGo_T_ETH_Elite_SX1262_repeater]
extends = LilyGo_T_ETH_Elite_SX1262
build_flags =
@ -87,7 +85,6 @@ lib_deps =
[env:LilyGo_T_ETH_Elite_SX1262_repeater_bridge_espnow_eth]
extends = LilyGo_T_ETH_Elite_SX1262
upload_speed = 115200
build_flags =
${LilyGo_T_ETH_Elite_SX1262.build_flags}
-D ADVERT_NAME='"T-ETH Elite SX1262 ESPNow Bridge eth"'
@ -97,7 +94,7 @@ build_flags =
-D MAX_NEIGHBOURS=50
-D WITH_ESPNOW_BRIDGE=1
-D USE_ETHERNET
-D ETH_STATIC_IP=192,168,254,21
-D ETH_STATIC_IP=192,168,254,20
-D ETH_GATEWAY=192,168,254,254
-D ETH_SUBNET=255,255,255,0
-D ETH_DNS=8,8,8,8

View file

@ -28,8 +28,6 @@ lib_deps =
stevemarple/MicroNMEA @ ^2.0.6
adafruit/Adafruit BME280 Library @ ^2.3.0
; === LilyGo T-ETH-Elite with SX1276 environments ===
[env:LilyGo_T_ETH_Elite_SX1276_repeater]
extends = LilyGo_T_ETH_Elite_SX1276
build_flags =