eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit a83bb33ea507811085b25de22ee67ac3095a7d7d
parent 5e0069e14628829d3e7eb19dcca6c347176e15d6
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Fri, 16 Apr 2021 17:02:32 -0500

rrm: React to IFTYPE_CHANGE events

If a netdev iftype is changed, all frame registrations are removed.
Make sure to re-register for the appropriate frame notifications in case
our iftype is switched back to 'station'.  In any other iftype, no frame
watches are registered and rrm_state object is effectively dormant.

Diffstat:
Msrc/rrm.c | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/rrm.c b/src/rrm.c @@ -835,7 +835,15 @@ static void rrm_netdev_watch(struct netdev *netdev, l_free(rrm); } - return; + break; + case NETDEV_WATCH_EVENT_IFTYPE_CHANGE: + rrm = l_queue_find(states, match_ifindex, + L_UINT_TO_PTR(ifindex)); + + if (rrm && netdev_get_iftype(netdev) == NETDEV_IFTYPE_STATION) + rrm_add_frame_watches(rrm); + + break; default: break; }