Message ID | 1433262583.7119.5.camel@A1-HR-PC (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Johannes Berg |
Headers | show |
+patch author > - if (retry->disabled || > + if (retry->disabled || retry->value < 1 || retry->value > 255 || > (retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT) > return -EINVAL; > > > > I'm wondering, is the 'retry->value < 1' is necessary? I would write > 'retry->value < 0' instead, to make possible to disable the retries. > Should I send a patch? I think this is likely some confusion over what "retry" means. Some places in the code used to take it as "# of transmission attempts", others (imho more correctly) interpret it as "# of retries". I think it's probably fine to change to < 0. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c @@ -370,7 +370,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev, u8 oshort = wdev->wiphy->retry_short; int err; - if (retry->disabled || + if (retry->disabled || retry->value < 1 || retry->value > 255 || (retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT) return -EINVAL;