From bc1b9ce10ca86644beda8bc6a8eb75c235884822 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Wed, 20 Nov 2019 23:23:41 +0100 Subject: [PATCH] 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. --- src/anqp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/anqp.c b/src/anqp.c index f3171456..6627bd81 100644 --- 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;