Johannes , 
While addressing this change, we could notice that the minimum boundary for 
beacon interval for the case of IBSS is 1 but for Mesh it is 10. Also this 
check is not done for AP/P2P GO . 
Any reason why there is a discrepancy among them ? These configurations should 
be aligned , I guess. 
Shouldn't the minimum value be 10 ? If yes , the boundary check should be moved 
to cfg80211_validate_beacon_int ? 

Thanks,
Purushottam


-----Original Message-----
From: Kushwaha, Purushottam 
Sent: Thursday, August 11, 2016 3:14 PM
To: [email protected]
Cc: [email protected]; Malinen, Jouni <[email protected]>; 
Undekari, Sunil Dutt <[email protected]>; Kalikot Veetil, Mahesh Kumar 
<[email protected]>; Hullur Subramanyam, Amarnath 
<[email protected]>; Kumar, Deepak (QCA) <[email protected]>; 
Kushwaha, Purushottam <[email protected]>
Subject: [PATCH] cfg80211: validate beacon interval for MESH/IBSS

Beacon interval validation was missing for MESH / IBSS join.
This commit addresses the same.

Signed-off-by: Purushottam Kushwaha <[email protected]>
---
 net/wireless/nl80211.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 
f02653a..ddb1469 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7780,6 +7780,10 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct 
genl_info *info)
                        return -EINVAL;
        }
 
+       err = cfg80211_validate_beacon_int(rdev, ibss.beacon_interval);
+       if (err)
+               return err;
+
        if (!rdev->ops->join_ibss)
                return -EOPNOTSUPP;
 
@@ -9255,6 +9259,10 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct 
genl_info *info)
                if (setup.beacon_interval < 10 ||
                    setup.beacon_interval > 10000)
                        return -EINVAL;
+
+               err = cfg80211_validate_beacon_int(rdev, setup.beacon_interval);
+               if (err)
+                       return err;
        }
 
        if (info->attrs[NL80211_ATTR_DTIM_PERIOD]) {
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to