Skip to content

Commit

Permalink
Fix error caused by netinit code assuming CONFIG_NETINIT_DNS was enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Alan C. Assis <[email protected]>
  • Loading branch information
acassis authored and xiaoxiang781216 committed Jul 7, 2024
1 parent 0989d82 commit 6b9d517
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions netutils/netinit/netinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,12 @@ static void netinit_net_bringup(void)
netlib_set_dripv4addr(NET_DEVNAME, &ds.default_router);
}

# ifdef CONFIG_NETINIT_DNS
if (ds.dnsaddr.s_addr != 0)
{
netlib_set_ipv4dnsaddr(&ds.dnsaddr);
}
# endif
}

dhcpc_close(handle);
Expand Down

0 comments on commit 6b9d517

Please sign in to comment.