esp-rs / esp-idf-svc

Type-Safe Rust Wrappers for various ESP-IDF services (WiFi, Network, Httpd, Logging, etc.)
https://docs.esp-rs.org/esp-idf-svc/
Apache License 2.0
333 stars 183 forks source link

EspNetif crashes on invalid DNS IP #353

Closed torkleyy closed 10 months ago

torkleyy commented 10 months ago

Of course the IP address is best sanitized before creating an EspNetif, but I noticed that currently EspNetif::new_with_conf crashes with DNS server set to 0.0.0.0 (which obviously doesn't work).

https://github.com/esp-rs/esp-idf-svc/blob/e54bc21891a9b675c55f6c7717198b594ce055b7/src/netif.rs#L335