Skip to contentSkip to conversation

cfg80211: prohibit zero keepalive interval

PATCH Applied Johannes Berg 1 participant 2 messages Feb 26, 2013 – Feb 28, 2013 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 cfg80211: prohibit zero keepalive interval

From: Johannes Berg <[email protected]>

It's not useful to specify a 0 keepalive interval, this would send too much data. Prohibit this to also avoid device issues.

---
 net/wireless/nl80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/wireless/nl80211.c +2 -1
index 2af3950..67bda6c 100644
@@ -7603,7 +7603,8 @@ static int nl80211_parse_wowlan_tcp(struct cfg80211_registered_device *rdev,
 		return -EINVAL;
 
 	if (nla_get_u32(tb[NL80211_WOWLAN_TCP_DATA_INTERVAL]) >
-			rdev->wiphy.wowlan.tcp->data_interval_max)
+			rdev->wiphy.wowlan.tcp->data_interval_max ||
+	    nla_get_u32(tb[NL80211_WOWLAN_TCP_DATA_INTERVAL]) == 0)
 		return -EINVAL;
 
 	wake_size = nla_len(tb[NL80211_WOWLAN_TCP_WAKE_PAYLOAD]);
Signature · 1 line
1.8.0
author maintainer Applied
#1 lore raw
Quoted 5 lines · Johannes Berg

From: Johannes Berg <[email protected]>

It's not useful to specify a 0 keepalive interval, this would send too much data. Prohibit this to also avoid device issues.

Applied.

johannes