commit bc1b9ce10ca86644beda8bc6a8eb75c235884822
parent aa754cbb4aacedd88f732d9dbdba97dc3fd8aa66
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Wed, 20 Nov 2019 23:23:41 +0100
anqp: Only register for frames on station interfaces
Check the iftype before registering ANQP on new interface.
Not that the check here and in rrm.c (which already checks the iftype)
may need to be extended to run on NETDEV_WATCH_EVENT_UP because a device
could be created with a different iftype and then have the iftype changed
before powering up.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/anqp.c b/src/anqp.c
@@ -374,7 +374,9 @@ static void anqp_netdev_watch(struct netdev *netdev,
{
switch (event) {
case NETDEV_WATCH_EVENT_NEW:
- anqp_register_frame(netdev_get_ifindex(netdev));
+ if (netdev_get_iftype(netdev) == NETDEV_IFTYPE_STATION)
+ anqp_register_frame(netdev_get_ifindex(netdev));
+
return;
default:
break;