Message ID | 1373534615-17270-1-git-send-email-yeohchunyeow@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Thu, 2013-07-11 at 17:23 +0800, Chun-Yeow Yeoh wrote: > RSSI threshold value used for mesh peering should be in > negative value. After range checks to mesh parameters is > introduced, this is not allowed. Fix this. > > Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> > --- > net/wireless/nl80211.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c > index a9444cd..e6164ab 100644 > --- a/net/wireless/nl80211.c > +++ b/net/wireless/nl80211.c > @@ -4803,9 +4803,9 @@ do { \ > FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding, 0, 1, > mask, NL80211_MESHCONF_FORWARDING, > nla_get_u8); > - FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, 1, 255, > - mask, NL80211_MESHCONF_RSSI_THRESHOLD, > - nla_get_u32); > + FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, > + 0x80000000, 0xFFFFFFFF, mask, > + NL80211_MESHCONF_RSSI_THRESHOLD, nla_get_u32); Maybe use nla_get_s32() instead? 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
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index a9444cd..e6164ab 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4803,9 +4803,9 @@ do { \ FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding, 0, 1, mask, NL80211_MESHCONF_FORWARDING, nla_get_u8); - FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, 1, 255, - mask, NL80211_MESHCONF_RSSI_THRESHOLD, - nla_get_u32); + FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, + 0x80000000, 0xFFFFFFFF, mask, + NL80211_MESHCONF_RSSI_THRESHOLD, nla_get_u32); FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, 0, 16, mask, NL80211_MESHCONF_HT_OPMODE, nla_get_u16);
RSSI threshold value used for mesh peering should be in negative value. After range checks to mesh parameters is introduced, this is not allowed. Fix this. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> --- net/wireless/nl80211.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)