Skip to content

fix: Assume DNS is the same IP than gateway #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/STM32Ethernet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ void EthernetClass::begin(IPAddress local_ip, IPAddress subnet)

void EthernetClass::begin(IPAddress local_ip, IPAddress subnet, IPAddress gateway)
{
// Assume the DNS server will be the machine on the same network as the local IP
// but with last octet being '1'
IPAddress dns_server = local_ip;
dns_server[3] = 1;
begin(local_ip, subnet, gateway, dns_server);
// Assume the DNS server will be the same machine than gateway
begin(local_ip, subnet, gateway, gateway);
}

void EthernetClass::begin(IPAddress local_ip, IPAddress subnet, IPAddress gateway, IPAddress dns_server)
Expand Down