With older versions of iw we can not get the channel that we
are currently associated with. So we cannot detect if we have
to fallback to that channel. Because of this, hostapd exits
with the following errors:
Failed to set beacon parameters
Interface initialization failed
ap0: interface state UNINITIALIZED->DISABLED
ap0: AP-DISABLED
ap0: Unable to setup interface.
hostapd_free_hapd_data: Interface ap0 wasn't started
A solution is to get the frequency from 'iw dev wlanN link' and
convert it to the channel number.
Fix#50
If someone have 2 adapters with the same hardware, there is a possibility
the first 5 bytes of their mac address to be the same.
I this case we will have mac address collision if we change both of them to
XX:XX:XX:XX:XX:14, one way to avoid this is to add 1 to their last byte.
Fix#47
In some Linux distributions (e.g. Ubuntu, Debian), udev automatically renames any device with its name prefix is "eth*", "wlan*",... as declared in "/lib/udev/rules.d/75-persistent-net-generator.rules". This made a problem when creating a virtual device on these distributions declaring that device not found. Solution was to change virtual device's name prefix to "ap*" to avoid this collision.
Ubuntu has a bit different setup than other distributions and because
of this dnsmasq was failing to retrieve the results of a DNS lookup.
This can be fixed if we specify that the listen-address is the gateway
instead of binding all the addresses of the WIFI_IFACE.
Fix#46
With the 6a3e1d98 commit NetworkManager was throwing an assertion so
we take a different approach when we create the bridge interface.
Also if the <interface-with-internet> is already a bridge interface
we skip creation.
The new approach is:
1) Save the IPs and route table of INTERNET_IFACE
2) If NetworkManager is running set INTERNET_IFACE as unmanaged
3) Create BRIDGE_IFACE and add INTERNET_IFACE to it
4) Set the previously saved IPs and route table to BRIDGE_IFACE
Better fix#19