Skip to content

Commit

Permalink
Use 8.8.8.8 for DNS resolution always
Browse files Browse the repository at this point in the history
  • Loading branch information
hikalium committed Aug 31, 2024
1 parent 947caa4 commit e85ab33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion os/src/net/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ fn handle_rx_dhcp_client(packet: &[u8], iface: &Rc<dyn NetworkInterface>) -> Res
DHCP_OPT_DNS => {
if let Ok(dns) = IpV4Addr::from_slice(&data) {
info!("dns: {dns}");
network.set_dns(Some(*dns));
//network.set_dns(Some(*dns));
network.set_dns(Some(IpV4Addr::new([8, 8, 8, 8])));
let arp_req = ArpPacket::request(iface.ethernet_addr(), new_self_ip, *dns);
iface.push_packet(arp_req.copy_into_slice())?;
}
Expand Down

0 comments on commit e85ab33

Please sign in to comment.