mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
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:
parent
ce1b760b29
commit
b1d7edc1e7
11 changed files with 55 additions and 46 deletions
|
|
@ -104,12 +104,10 @@ void setup() {
|
|||
|
||||
the_mesh.begin(fs);
|
||||
|
||||
the_mesh.begin(fs);
|
||||
|
||||
#ifdef USE_ETHERNET
|
||||
NodePrefs* prefs = the_mesh.getNodePrefs();
|
||||
if (prefs->eth_ip != 0) {
|
||||
board.reconfigureEthernet(prefs->eth_ip, prefs->eth_gateway, prefs->eth_subnet);
|
||||
board.reconfigureEthernet(prefs->eth_ip, prefs->eth_gateway, prefs->eth_subnet, prefs->eth_dns1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -170,7 +168,7 @@ void loop() {
|
|||
#endif
|
||||
|
||||
the_mesh.loop();
|
||||
#if defined(ESP32) && defined(TCP_CONSOLE_PORT)
|
||||
#if defined(TCP_CONSOLE_PORT)
|
||||
tcp_console.loop(the_mesh);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue