nerves-networking/vintage_net

Configuring an interface that doesn't exist will result in confusing results

ConnorRigby opened this issue · 1 comments

Describe the bug
Configuring a network interface with VintageNet.configure/2 will result in no errors, but nothing happens.

To Reproduce

VintageNet.configure("wlan1", %{type: VintageNet.Technology.WiFi})

Expected behavior
state to have something a bit more useful. Right now it goes directly to retrying, but not_present or something to that effect would be more useful

I think this is resolved:

iex> VintageNet.configure("wlan1", %{type: VintageNet.Technology.WiFi})
:ok 
iex> VintageNet.info()
VintageNet 0.9.1

All interfaces:       ["lo", "usb0", "wlan0"]
Available interfaces: []

  ... other interface configs omitted ...

Interface wlan1
  Type: VintageNetWiFi
  Present: false
  Configuration:
    %{
      ipv4: %{method: :disabled},
      type: VintageNetWiFi,
      vintage_net_wifi: %{networks: []}
    }

:ok

The Present field says false.

I think this can be closed?