On Wed, 2011-11-02 at 11:03 -0700, Ben Greear wrote: > >>>> /* add attributes here, update the policy in nl80211.c */ > >> > >> I copied some of that code from nl80211_set_station, which appears to > >> also forget to check the length for the NL80211_ATTR_HT_CAPABILITY > >> object. Is there some reason why it doesn't need to check, or does > >> that code need fixing as well? > > > > NL80211_ATTR_HT_CAPABILITY in particular *has* a policy entry. > > Ahh, I didn't realize that's what was meant by policy. Mind if > I change that comment to something like what is below? > > /* add attributes here, update the nl80211_policy array in nl80211.c */ That seems reasonable, though there are multiple policies for differently nested attributes, but I guess anyone who understands that will get far enough anyway :-) FWIW, I just found that the exact example you pointed out had a bug -- NLA_BINARY enforces a *max*, not *min* length. There's a patch in flight to fix it. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html