From dd866dada7a6fdc964b3d44147b343406e06f1f6 Mon Sep 17 00:00:00 2001 From: Juraj Andrassy Date: Thu, 4 Apr 2024 19:15:42 +0200 Subject: [PATCH] Ethernet begin with static IP - set DNS with interface name --- libraries/Ethernet/src/Ethernet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/Ethernet/src/Ethernet.cpp b/libraries/Ethernet/src/Ethernet.cpp index 50c43c9c5..2e0f1a94f 100644 --- a/libraries/Ethernet/src/Ethernet.cpp +++ b/libraries/Ethernet/src/Ethernet.cpp @@ -55,7 +55,9 @@ int arduino::EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPA eth_if->set_dhcp(false); eth_if->set_network(_ip, _netmask, _gateway); - eth_if->add_dns_server(_dnsServer1, nullptr); + char if_name[5]; + eth_if->get_interface_name(if_name); + eth_if->add_dns_server(_dnsServer1, if_name); auto ret = _begin(mac, timeout, responseTimeout); return ret; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy