bmx-routing / bmx7

BMX7 / SEMTOR Securely Entrusted Mesh Routing Protocol
GNU General Public License v2.0
63 stars 15 forks source link

interface type not always detected correctly #19

Closed dangowrt closed 6 years ago

dangowrt commented 6 years ago

when using encrypted wireless interfaces or operating on DFS channels using wpa_supplicant the interface can take a long time (minutes!) until it comes up. somehow bmx7 only checks the interface type once on startup and then assumes those interfaces as TYP_DEV_LL_LAN. This is problematic as we simply cannot always wait long enough to ensure that a wireless interface has come up before starting bmx7. It also turns out that removing and re-adding an interface while bmx7 is running sometimes has quite weird effects such as the interface disappearing from bmx7 interface list. Also here, we shouldn't have to restart bmx7 every time an interface comes up or down.

axn commented 6 years ago

Do you have an idea how to solve the issue? What about checking the interface type (whether its TYP_DEV_LL_LAN or TYP_DEV_LL_WLAN) only (but always) when the interface comes up?

dangowrt commented 6 years ago

Do you have an idea how to solve the issue? What about checking the interface type (whether its TYP_DEV_LL_LAN or TYP_DEV_LL_WLAN) only (but always) when the interface comes up?

Yes, I guess that'd be the way to go because interfaces may go down and be brought up at any time. When using wpa_supplicant for encrypted 802.11s the interface is first created by netifd, then modified by wpa_supplicant and it may take ages to actually come up...

axn commented 6 years ago

Ok, will try to fix that, likely not before May

axn commented 6 years ago

Should be fixed with https://github.com/bmx-routing/bmx7/commit/6e5a61bf87d50e045b1ade71f127565cb687ca94 from https://github.com/bmx-routing/bmx7/tree/fixes

Please test

axn commented 6 years ago

@dangowrt would be nice if you can test in your setup If it works I can backport to bmx6

axn commented 6 years ago

Seems fixed

dangowrt commented 6 years ago

On Mon, May 21, 2018 at 02:14:41PM -0700, Axel Neumann wrote:

Seems fixed

In 98% of the cases: yes. Unfortunately, there are still 2% of cases where it get's detected as Ethernet during startup at boot time and then it remains that way.