nerves-project-attic/nerves_network

Wireless Rpi3 - nxdomain error

visciang opened this issue · 3 comments

Just updated to latest nerves_* releases and built a fresh firmware for my RPI3.

bootloader           0.1.2
nerves               0.7.5
nerves_firmware_ssh  0.3.0
nerves_network       0.3.4
nerves_runtime       0.5.0
nerves_system_rpi3   0.17.0

My WiFi connection is correctly established and a IP address is assigned via DHCP to the wlan0 interface. The connection works as expected but the DNS resolution is not working (nxdomain error).

The DNS lookup works pointing to google DNS:
:inet_res.lookup('nerves-project.org', :in, :a, [nameservers: [{{8,8,8,8}, 53}]])

but not with the system default one:
:inet_res.lookup('nerves-project.org', :in, :a)

Nerves.Network.status "wlan0":

%{domain: "fritz.box", ifname: "wlan0", index: 3,
 ipv4_address: "192.168.178.30", ipv4_broadcast: "192.168.178.255",
 ipv4_gateway: "192.168.178.1", ipv4_subnet_mask: "255.255.255.0",
 ...
nameservers: ["192.168.178.1"],
...
}

Checked with a clean nerves_examples/hello_network build.
I think the issue is related to nerves_system_rpi3 0.17.0.

With nerves_system_rpi3 0.16.1, the DNS resolution works as expected:

  bootloader 0.1.2
  distillery 1.5.2
  elixir_make 0.4.0
  nerves 0.7.5
  nerves_network 0.3.4
  nerves_network_interface 0.4.2
  nerves_runtime 0.5.0
  nerves_system_br 0.13.9
  nerves_system_rpi3 0.16.1
  nerves_toolchain_arm_unknown_linux_gnueabihf 0.11.0
  nerves_toolchain_ctng 1.1.0
  nerves_wpa_supplicant 0.3.2
  system_registry 0.6.0

After upgrading nerves_system_rpi3 to 0.17.0, it doesn't work:

  bootloader 0.1.2
  distillery 1.5.2
  elixir_make 0.4.0
  nerves 0.7.5
  nerves_network 0.3.4
  nerves_network_interface 0.4.2
  nerves_runtime 0.5.0
  nerves_system_br 0.14.0
  nerves_system_rpi3 0.17.0
  nerves_toolchain_arm_unknown_linux_gnueabihf 0.11.0
  nerves_toolchain_ctng 1.1.0
  nerves_wpa_supplicant 0.3.2
  system_registry 0.6.0

Thanks for reporting this @visciang. I am able to reproduce the problem and it appears that the symlink for /etc/resolv.conf -> /tmp/resolv.conf is missing. When updating to the latest buildroot, we started to provide our own skeleton and it seems that this might have been missed.

I am building a test system now to see if this fixes the issue and should have this patched and out soon.

❤️
Thanks!

This should be all fixed in nerves_system_rpi3 v0.17.1 as well as on all other systems. Please update and give it a try. Thanks!